julia.rb 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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;2023 Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and other contributors<br>
  9. Licensed under the MIT License.
  10. HTML
  11. version '1.10' do
  12. self.release = '1.10.0.2'
  13. self.base_url = "https://docs.julialang.org/en/v#{version}/"
  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.9' do
  20. self.release = '1.9.2'
  21. self.base_url = "https://docs.julialang.org/en/v#{version}/"
  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.8' do
  28. self.release = '1.8.5'
  29. self.base_url = "https://docs.julialang.org/en/v#{version}/"
  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.7' do
  36. self.release = '1.7.0'
  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-main'
  41. options[:only_patterns] = [/\Amanual\//, /\Abase\//, /\Astdlib\//]
  42. end
  43. version '1.6' do
  44. self.release = '1.6.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-main'
  49. options[:only_patterns] = [/\Amanual\//, /\Abase\//, /\Astdlib\//]
  50. end
  51. version '1.5' do
  52. self.release = '1.5.3'
  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-main'
  57. options[:only_patterns] = [/\Amanual\//, /\Abase\//, /\Astdlib\//]
  58. end
  59. version '1.4' do
  60. self.release = '1.4.2'
  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-main'
  65. options[:only_patterns] = [/\Amanual\//, /\Abase\//, /\Astdlib\//]
  66. end
  67. version '1.3' do
  68. self.release = '1.3.1'
  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 '1.2' do
  76. self.release = '1.2.0'
  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\//, /\Abase\//, /\Astdlib\//]
  82. end
  83. version '1.1' do
  84. self.release = '1.1.1'
  85. self.base_url = "https://docs.julialang.org/en/v#{release}/"
  86. self.type = 'julia'
  87. html_filters.push 'julia/entries', 'julia/clean_html'
  88. options[:container] = '#docs'
  89. options[:only_patterns] = [/\Amanual\//, /\Abase\//, /\Astdlib\//]
  90. end
  91. version '1.0' do
  92. self.release = '1.0.4'
  93. self.base_url = "https://docs.julialang.org/en/v#{release}/"
  94. self.type = 'julia'
  95. html_filters.push 'julia/entries', 'julia/clean_html'
  96. options[:container] = '#docs'
  97. options[:only_patterns] = [/\Amanual\//, /\Abase\//, /\Astdlib\//]
  98. end
  99. version '0.7' do
  100. self.release = '0.7.0'
  101. self.base_url = "https://docs.julialang.org/en/v#{release}/"
  102. self.type = 'julia'
  103. html_filters.push 'julia/entries', 'julia/clean_html'
  104. options[:container] = '#docs'
  105. options[:only_patterns] = [/\Amanual\//, /\Abase\//, /\Astdlib\//]
  106. end
  107. version '0.6' do
  108. self.release = '0.6.2'
  109. self.base_url = "https://docs.julialang.org/en/v#{release}/"
  110. self.type = 'julia'
  111. html_filters.push 'julia/entries', 'julia/clean_html'
  112. options[:container] = '#docs'
  113. options[:only_patterns] = [/\Amanual\//, /\Astdlib\//]
  114. end
  115. version '0.5' do
  116. self.release = '0.5.2'
  117. self.base_url = "https://docs.julialang.org/en/v#{release}/"
  118. self.type = 'sphinx_simple'
  119. html_filters.push 'julia/entries_sphinx', 'julia/clean_html_sphinx', 'sphinx/clean_html'
  120. options[:only_patterns] = [/\Amanual\//, /\Astdlib\//]
  121. end
  122. def get_latest_version(opts)
  123. get_latest_github_release('JuliaLang', 'julia', opts)
  124. end
  125. end
  126. end