You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
module Docs
|
|
|
|
class Git < UrlScraper
|
|
|
|
self.type = 'git'
|
|
|
|
self.release = '2.8.0'
|
|
|
|
self.base_url = 'https://git-scm.com/docs'
|
|
|
|
self.initial_paths = %w(/git.html)
|
|
|
|
self.links = {
|
|
|
|
home: 'https://git-scm.com/',
|
|
|
|
code: 'https://github.com/git/git'
|
|
|
|
}
|
|
|
|
|
|
|
|
html_filters.push 'git/clean_html', 'git/entries'
|
|
|
|
|
|
|
|
options[:container] = ->(filter) { filter.root_page? ? '#main' : '.man-page, #main' }
|
|
|
|
options[:follow_links] = ->(filter) { filter.root_page? }
|
|
|
|
options[:only_patterns] = [/\A\/git\-/]
|
|
|
|
|
|
|
|
options[:attribution] = <<-HTML
|
|
|
|
© 2005–2016 Linus Torvalds and others<br>
|
|
|
|
Licensed under the GNU General Public License version 2.
|
|
|
|
HTML
|
|
|
|
end
|
|
|
|
end
|