git.rb 702 B

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