julia.rb 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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[:only_patterns] = [/\Amanual\//, /\Astdlib\//]
  8. options[:attribution] = <<-HTML
  9. &copy; 2009&ndash;2019 Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and other contributors<br>
  10. Licensed under the MIT License.
  11. HTML
  12. version '1.2' do
  13. self.release = '1.2.0'
  14. self.base_url = "https://docs.julialang.org/en/v#{release}/"
  15. self.type = 'julia'
  16. html_filters.push 'julia/entries', 'julia/clean_html'
  17. options[:container] = '#docs'
  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. end
  26. version '1.0' do
  27. self.release = '1.0.4'
  28. self.base_url = "https://docs.julialang.org/en/v#{release}/"
  29. self.type = 'julia'
  30. html_filters.push 'julia/entries', 'julia/clean_html'
  31. options[:container] = '#docs'
  32. end
  33. version '0.7' do
  34. self.release = '0.7.0'
  35. self.base_url = "https://docs.julialang.org/en/v#{release}/"
  36. self.type = 'julia'
  37. html_filters.push 'julia/entries', 'julia/clean_html'
  38. options[:container] = '#docs'
  39. end
  40. version '0.6' do
  41. self.release = '0.6.2'
  42. self.base_url = "https://docs.julialang.org/en/v#{release}/"
  43. self.type = 'julia'
  44. html_filters.push 'julia/entries', 'julia/clean_html'
  45. options[:container] = '#docs'
  46. end
  47. version '0.5' do
  48. self.release = '0.5.2'
  49. self.base_url = "https://docs.julialang.org/en/v#{release}/"
  50. self.type = 'sphinx_simple'
  51. html_filters.push 'julia/entries_sphinx', 'julia/clean_html_sphinx', 'sphinx/clean_html'
  52. end
  53. def get_latest_version(opts)
  54. get_latest_github_release('JuliaLang', 'julia', opts)
  55. end
  56. end
  57. end