julia.rb 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. module Docs
  2. class Julia < UrlScraper
  3. self.links = {
  4. home: 'https://julialang.org/',
  5. code: 'https://github.com/JuliaLang/julia'
  6. }
  7. options[:attribution] = <<-HTML
  8. &copy; 2009&ndash;2021 Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and other contributors<br>
  9. Licensed under the MIT License.
  10. HTML
  11. version '1.6' do
  12. self.release = '1.6.0'
  13. self.base_url = "https://docs.julialang.org/en/v#{release}/"
  14. self.type = 'julia'
  15. html_filters.push 'julia/entries', 'julia/clean_html'
  16. options[:container] = '.docs-main'
  17. options[:only_patterns] = [/\Amanual\//, /\Abase\//, /\Astdlib\//]
  18. end
  19. version '1.5' do
  20. self.release = '1.5.3'
  21. self.base_url = "https://docs.julialang.org/en/v#{release}/"
  22. self.type = 'julia'
  23. html_filters.push 'julia/entries', 'julia/clean_html'
  24. options[:container] = '.docs-main'
  25. options[:only_patterns] = [/\Amanual\//, /\Abase\//, /\Astdlib\//]
  26. end
  27. version '1.4' do
  28. self.release = '1.4.2'
  29. self.base_url = "https://docs.julialang.org/en/v#{release}/"
  30. self.type = 'julia'
  31. html_filters.push 'julia/entries', 'julia/clean_html'
  32. options[:container] = '.docs-main'
  33. options[:only_patterns] = [/\Amanual\//, /\Abase\//, /\Astdlib\//]
  34. end
  35. version '1.3' do
  36. self.release = '1.3.1'
  37. self.base_url = "https://docs.julialang.org/en/v#{release}/"
  38. self.type = 'julia'
  39. html_filters.push 'julia/entries', 'julia/clean_html'
  40. options[:container] = '#docs'
  41. options[:only_patterns] = [/\Amanual\//, /\Abase\//, /\Astdlib\//]
  42. end
  43. version '1.2' do
  44. self.release = '1.2.0'
  45. self.base_url = "https://docs.julialang.org/en/v#{release}/"
  46. self.type = 'julia'
  47. html_filters.push 'julia/entries', 'julia/clean_html'
  48. options[:container] = '#docs'
  49. options[:only_patterns] = [/\Amanual\//, /\Abase\//, /\Astdlib\//]
  50. end
  51. version '1.1' do
  52. self.release = '1.1.1'
  53. self.base_url = "https://docs.julialang.org/en/v#{release}/"
  54. self.type = 'julia'
  55. html_filters.push 'julia/entries', 'julia/clean_html'
  56. options[:container] = '#docs'
  57. options[:only_patterns] = [/\Amanual\//, /\Abase\//, /\Astdlib\//]
  58. end
  59. version '1.0' do
  60. self.release = '1.0.4'
  61. self.base_url = "https://docs.julialang.org/en/v#{release}/"
  62. self.type = 'julia'
  63. html_filters.push 'julia/entries', 'julia/clean_html'
  64. options[:container] = '#docs'
  65. options[:only_patterns] = [/\Amanual\//, /\Abase\//, /\Astdlib\//]
  66. end
  67. version '0.7' do
  68. self.release = '0.7.0'
  69. self.base_url = "https://docs.julialang.org/en/v#{release}/"
  70. self.type = 'julia'
  71. html_filters.push 'julia/entries', 'julia/clean_html'
  72. options[:container] = '#docs'
  73. options[:only_patterns] = [/\Amanual\//, /\Abase\//, /\Astdlib\//]
  74. end
  75. version '0.6' do
  76. self.release = '0.6.2'
  77. self.base_url = "https://docs.julialang.org/en/v#{release}/"
  78. self.type = 'julia'
  79. html_filters.push 'julia/entries', 'julia/clean_html'
  80. options[:container] = '#docs'
  81. options[:only_patterns] = [/\Amanual\//, /\Astdlib\//]
  82. end
  83. version '0.5' do
  84. self.release = '0.5.2'
  85. self.base_url = "https://docs.julialang.org/en/v#{release}/"
  86. self.type = 'sphinx_simple'
  87. html_filters.push 'julia/entries_sphinx', 'julia/clean_html_sphinx', 'sphinx/clean_html'
  88. options[:only_patterns] = [/\Amanual\//, /\Astdlib\//]
  89. end
  90. def get_latest_version(opts)
  91. get_latest_github_release('JuliaLang', 'julia', opts)
  92. end
  93. end
  94. end