fish.rb 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. module Docs
  2. class Fish < UrlScraper
  3. self.name = 'Fish'
  4. self.type = 'simple'
  5. self.root_path = 'index.html'
  6. self.links = {
  7. home: 'https://fishshell.com/',
  8. code: 'https://github.com/fish-shell/fish-shell'
  9. }
  10. options[:skip] = %w(design.html license.html)
  11. # https://fishshell.com/docs/current/license.html
  12. options[:attribution] = <<-HTML
  13. &copy; 2021 fish-shell developers<br>
  14. Licensed under the GNU General Public License, version 2.
  15. HTML
  16. version '3.3' do
  17. self.release = '3.3.0'
  18. self.base_url = "https://fishshell.com/docs/#{version}/"
  19. options[:skip].concat %w(genindex.html relnotes.html)
  20. html_filters.push 'sphinx/clean_html', 'fish/clean_html_sphinx', 'fish/entries_sphinx'
  21. end
  22. version '3.2' do
  23. self.release = '3.2.0'
  24. self.base_url = "https://fishshell.com/docs/#{version}/"
  25. options[:skip].concat %w(genindex.html relnotes.html)
  26. html_filters.push 'sphinx/clean_html', 'fish/clean_html_sphinx', 'fish/entries_sphinx'
  27. end
  28. version '3.1' do
  29. self.release = '3.1.2'
  30. self.base_url = "https://fishshell.com/docs/#{version}/"
  31. options[:skip].concat %w(genindex.html commands.html)
  32. html_filters.push 'sphinx/clean_html', 'fish/clean_html_sphinx', 'fish/entries_sphinx'
  33. end
  34. version '3.0' do
  35. self.release = '3.0.1'
  36. self.base_url = "https://fishshell.com/docs/#{version}/"
  37. html_filters.push 'fish/clean_html_custom', 'fish/entries_custom'
  38. end
  39. version '2.7' do
  40. self.release = '2.7.1'
  41. self.base_url = "https://fishshell.com/docs/#{version}/"
  42. html_filters.push 'fish/clean_html_custom', 'fish/entries_custom'
  43. end
  44. version '2.6' do
  45. self.release = '2.6.0'
  46. self.base_url = "https://fishshell.com/docs/#{version}/"
  47. html_filters.push 'fish/clean_html_custom', 'fish/entries_custom'
  48. end
  49. version '2.5' do
  50. self.release = '2.5.0'
  51. self.base_url = "https://fishshell.com/docs/#{version}/"
  52. html_filters.push 'fish/clean_html_custom', 'fish/entries_custom'
  53. end
  54. version '2.4' do
  55. self.release = '2.4.0'
  56. self.base_url = "https://fishshell.com/docs/#{version}/"
  57. html_filters.push 'fish/clean_html_custom', 'fish/entries_custom'
  58. end
  59. version '2.3' do
  60. self.release = '2.3.1'
  61. self.base_url = "https://fishshell.com/docs/#{version}/"
  62. html_filters.push 'fish/clean_html_custom', 'fish/entries_custom'
  63. end
  64. version '2.2' do
  65. self.release = '2.2.0'
  66. self.base_url = "https://fishshell.com/docs/#{version}/"
  67. html_filters.push 'fish/clean_html_custom', 'fish/entries_custom'
  68. end
  69. def get_latest_version(opts)
  70. get_latest_github_release('fish-shell', 'fish-shell', opts)
  71. end
  72. end
  73. end