julia.rb 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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;2019 Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and other contributors<br>
  9. Licensed under the MIT License.
  10. HTML
  11. version '1.2' do
  12. self.release = '1.2.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'
  17. options[:only_patterns] = [/\Amanual\//, /\Abase\//, /\Astdlib\//]
  18. end
  19. version '1.1' do
  20. self.release = '1.1.1'
  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'
  25. options[:only_patterns] = [/\Amanual\//, /\Abase\//, /\Astdlib\//]
  26. end
  27. version '1.0' do
  28. self.release = '1.0.4'
  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'
  33. options[:only_patterns] = [/\Amanual\//, /\Abase\//, /\Astdlib\//]
  34. end
  35. version '0.7' do
  36. self.release = '0.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'
  41. options[:only_patterns] = [/\Amanual\//, /\Abase\//, /\Astdlib\//]
  42. end
  43. version '0.6' do
  44. self.release = '0.6.2'
  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\//, /\Astdlib\//]
  50. end
  51. version '0.5' do
  52. self.release = '0.5.2'
  53. self.base_url = "https://docs.julialang.org/en/v#{release}/"
  54. self.type = 'sphinx_simple'
  55. html_filters.push 'julia/entries_sphinx', 'julia/clean_html_sphinx', 'sphinx/clean_html'
  56. options[:only_patterns] = [/\Amanual\//, /\Astdlib\//]
  57. end
  58. def get_latest_version(opts)
  59. get_latest_github_release('JuliaLang', 'julia', opts)
  60. end
  61. end
  62. end