git.rb 594 B

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