scikit_image.rb 920 B

12345678910111213141516171819202122232425262728293031
  1. module Docs
  2. class ScikitImage < UrlScraper
  3. self.name = 'scikit-image'
  4. self.slug = 'scikit_image'
  5. self.type = 'sphinx'
  6. self.release = '0.25.0'
  7. v = self.release[/\d+\.\d+/]
  8. self.base_url = "https://scikit-image.org/docs/#{v}.x/"
  9. self.initial_paths = %w(/ /api/ /user_guide/)
  10. self.links = {
  11. home: 'https://scikit-image.org/',
  12. code: 'https://github.com/scikit-image/scikit-image'
  13. }
  14. html_filters.push 'scikit_image/entries', 'sphinx/clean_html'
  15. options[:container] = 'main article'
  16. options[:skip] = %w(api_changes.html)
  17. options[:only_patterns] = [/\Aapi/, /\Auser_guide/]
  18. options[:attribution] = <<-HTML
  19. &copy; 2019 the scikit-image team<br>
  20. Licensed under the BSD 3-clause License.
  21. HTML
  22. def get_latest_version(opts)
  23. tags = get_github_tags('scikit-image', 'scikit-image', opts)
  24. tags[0]['name'][1..-1]
  25. end
  26. end
  27. end