git.rb 636 B

1234567891011121314151617181920212223
  1. module Docs
  2. class Git < UrlScraper
  3. self.type = 'git'
  4. self.release = '2.17.0'
  5. self.base_url = 'https://git-scm.com/docs'
  6. self.initial_paths = %w(/git.html)
  7. self.links = {
  8. home: 'https://git-scm.com/',
  9. code: 'https://github.com/git/git'
  10. }
  11. html_filters.push 'git/entries', 'git/clean_html'
  12. options[:container] = '#content'
  13. options[:only_patterns] = [/\A\/[^\/]+\z/]
  14. options[:skip] = %w(/howto-index.html)
  15. options[:attribution] = <<-HTML
  16. &copy; 2005&ndash;2018 Linus Torvalds and others<br>
  17. Licensed under the GNU General Public License version 2.
  18. HTML
  19. end
  20. end