matplotlib.rb 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. module Docs
  2. class Matplotlib < UrlScraper
  3. include MultipleBaseUrls
  4. self.name = 'Matplotlib'
  5. self.type = 'sphinx'
  6. self.root_path = 'index.html'
  7. self.links = {
  8. home: 'https://matplotlib.org/',
  9. code: 'https://github.com/matplotlib/matplotlib'
  10. }
  11. html_filters.push 'matplotlib/entries', 'sphinx/clean_html'
  12. options[:container] = '.body, section'
  13. options[:skip] = %w(api_changes.html tutorial.html faq.html)
  14. options[:attribution] = <<-HTML
  15. &copy; 2012&ndash;2022 Matplotlib Development Team. All rights reserved.<br>
  16. Licensed under the Matplotlib License Agreement.
  17. HTML
  18. version '3.6' do
  19. self.release = '3.6.0'
  20. self.base_urls = [
  21. "https://matplotlib.org/stable/api/",
  22. "https://matplotlib.org/stable/mpl_toolkits/mplot3d/",
  23. "https://matplotlib.org/stable/mpl_toolkits/axes_grid/api/"
  24. ]
  25. end
  26. version '3.5' do
  27. self.release = '3.5.1'
  28. self.base_urls = [
  29. "https://matplotlib.org/#{release}/api/",
  30. "https://matplotlib.org/#{release}/mpl_toolkits/mplot3d/",
  31. "https://matplotlib.org/#{release}/mpl_toolkits/axes_grid/api/"
  32. ]
  33. end
  34. version '3.4' do
  35. self.release = '3.4.3'
  36. self.base_urls = [
  37. "https://matplotlib.org/#{release}/api/",
  38. "https://matplotlib.org/#{release}/mpl_toolkits/mplot3d/",
  39. "https://matplotlib.org/#{release}/mpl_toolkits/axes_grid/api/"
  40. ]
  41. end
  42. version '3.3' do
  43. self.release = '3.3.3'
  44. self.base_urls = [
  45. "https://matplotlib.org/#{release}/api/",
  46. "https://matplotlib.org/#{release}/mpl_toolkits/mplot3d/",
  47. "https://matplotlib.org/#{release}/mpl_toolkits/axes_grid/api/"
  48. ]
  49. end
  50. version '3.2' do
  51. self.release = '3.2.2'
  52. self.base_urls = [
  53. "https://matplotlib.org/#{release}/api/",
  54. "https://matplotlib.org/#{release}/mpl_toolkits/mplot3d/",
  55. "https://matplotlib.org/#{release}/mpl_toolkits/axes_grid/api/"
  56. ]
  57. end
  58. version '3.1' do
  59. self.release = '3.1.1'
  60. self.base_urls = [
  61. "https://matplotlib.org/#{release}/api/",
  62. "https://matplotlib.org/#{release}/mpl_toolkits/mplot3d/",
  63. "https://matplotlib.org/#{release}/mpl_toolkits/axes_grid/api/"
  64. ]
  65. end
  66. version '3.0' do
  67. self.release = '3.0.0'
  68. self.base_urls = [
  69. "https://matplotlib.org/#{release}/api/",
  70. "https://matplotlib.org/#{release}/mpl_toolkits/mplot3d/",
  71. "https://matplotlib.org/#{release}/mpl_toolkits/axes_grid/api/"
  72. ]
  73. end
  74. version '2.2' do
  75. self.release = '2.2.3'
  76. self.base_urls = [
  77. "https://matplotlib.org/#{release}/api/",
  78. "https://matplotlib.org/#{release}/mpl_toolkits/mplot3d/",
  79. "https://matplotlib.org/#{release}/mpl_toolkits/axes_grid/api/"
  80. ]
  81. end
  82. version '2.1' do
  83. self.release = '2.1.0'
  84. self.base_urls = [
  85. "https://matplotlib.org/#{release}/api/",
  86. "https://matplotlib.org/#{release}/mpl_toolkits/mplot3d/",
  87. "https://matplotlib.org/#{release}/mpl_toolkits/axes_grid/api/"
  88. ]
  89. end
  90. version '2.0' do
  91. self.release = '2.0.2'
  92. self.base_urls = [
  93. "https://matplotlib.org/#{release}/api/",
  94. "https://matplotlib.org/#{release}/mpl_toolkits/mplot3d/",
  95. "https://matplotlib.org/#{release}/mpl_toolkits/axes_grid/api/"
  96. ]
  97. end
  98. version '1.5' do
  99. self.release = '1.5.3'
  100. self.base_urls = [
  101. "https://matplotlib.org/#{release}/api/",
  102. "https://matplotlib.org/#{release}/mpl_toolkits/mplot3d/",
  103. "https://matplotlib.org/#{release}/mpl_toolkits/axes_grid/api/"
  104. ]
  105. end
  106. def get_latest_version(opts)
  107. get_latest_github_release('matplotlib', 'matplotlib', opts)
  108. end
  109. end
  110. end