1
0

matplotlib.rb 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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'
  13. options[:skip] = %w(api_changes.html tutorial.html faq.html)
  14. options[:attribution] = <<-HTML
  15. &copy; 2012&ndash;2018 Matplotlib Development Team. All rights reserved.<br>
  16. Licensed under the Matplotlib License Agreement.
  17. HTML
  18. version '3.0' do
  19. self.release = '3.0.0'
  20. self.base_urls = [
  21. "https://matplotlib.org/#{release}/api/",
  22. "https://matplotlib.org/#{release}/mpl_toolkits/mplot3d/",
  23. "https://matplotlib.org/#{release}/mpl_toolkits/axes_grid/api/"
  24. ]
  25. end
  26. version '2.2' do
  27. self.release = '2.2.3'
  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 '2.1' do
  35. self.release = '2.1.0'
  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 '2.0' do
  43. self.release = '2.0.2'
  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 '1.5' do
  51. self.release = '1.5.3'
  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. def get_latest_version(opts)
  59. get_latest_github_release('matplotlib', 'matplotlib', opts)
  60. end
  61. end
  62. end