2013-12-13 19:00:07 +01:00
|
|
|
module Docs
|
|
|
|
class Git < UrlScraper
|
|
|
|
self.type = 'git'
|
2015-03-01 16:39:36 +01:00
|
|
|
self.version = '2.3.1'
|
2013-12-13 19:00:07 +01:00
|
|
|
self.base_url = 'http://git-scm.com/docs'
|
|
|
|
self.initial_paths = %w(/git.html)
|
|
|
|
|
|
|
|
html_filters.push 'git/clean_html', 'git/entries'
|
|
|
|
|
2014-07-01 16:24:47 +02:00
|
|
|
options[:container] = ->(filter) { filter.root_page? ? '#main' : '.man-page, #main' }
|
2013-12-13 19:00:07 +01:00
|
|
|
options[:follow_links] = ->(filter) { filter.root_page? }
|
|
|
|
options[:only_patterns] = [/\A\/git\-/]
|
|
|
|
|
|
|
|
options[:attribution] = <<-HTML
|
2015-02-01 21:59:09 +01:00
|
|
|
© 2005–2015 Linus Torvalds and others<br>
|
2013-12-13 19:00:07 +01:00
|
|
|
Licensed under the GNU General Public License version 2.
|
|
|
|
HTML
|
|
|
|
end
|
|
|
|
end
|