fish.rb 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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; 2020 fish-shell developers<br>
  14. Licensed under the GNU General Public License, version 2.
  15. HTML
  16. version '3.2' do
  17. self.release = '3.2.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.1' do
  23. self.release = '3.1.2'
  24. self.base_url = "https://fishshell.com/docs/#{version}/"
  25. options[:skip].concat %w(genindex.html commands.html)
  26. html_filters.push 'sphinx/clean_html', 'fish/clean_html_sphinx', 'fish/entries_sphinx'
  27. end
  28. version '3.0' do
  29. self.release = '3.0.1'
  30. self.base_url = "https://fishshell.com/docs/#{version}/"
  31. html_filters.push 'fish/clean_html_custom', 'fish/entries_custom'
  32. end
  33. version '2.7' do
  34. self.release = '2.7.1'
  35. self.base_url = "https://fishshell.com/docs/#{version}/"
  36. html_filters.push 'fish/clean_html_custom', 'fish/entries_custom'
  37. end
  38. version '2.6' do
  39. self.release = '2.6.0'
  40. self.base_url = "https://fishshell.com/docs/#{version}/"
  41. html_filters.push 'fish/clean_html_custom', 'fish/entries_custom'
  42. end
  43. version '2.5' do
  44. self.release = '2.5.0'
  45. self.base_url = "https://fishshell.com/docs/#{version}/"
  46. html_filters.push 'fish/clean_html_custom', 'fish/entries_custom'
  47. end
  48. version '2.4' do
  49. self.release = '2.4.0'
  50. self.base_url = "https://fishshell.com/docs/#{version}/"
  51. html_filters.push 'fish/clean_html_custom', 'fish/entries_custom'
  52. end
  53. version '2.3' do
  54. self.release = '2.3.1'
  55. self.base_url = "https://fishshell.com/docs/#{version}/"
  56. html_filters.push 'fish/clean_html_custom', 'fish/entries_custom'
  57. end
  58. version '2.2' do
  59. self.release = '2.2.0'
  60. self.base_url = "https://fishshell.com/docs/#{version}/"
  61. html_filters.push 'fish/clean_html_custom', 'fish/entries_custom'
  62. end
  63. def get_latest_version(opts)
  64. get_latest_github_release('fish-shell', 'fish-shell', opts)
  65. end
  66. end
  67. end