mirror of
https://github.com/freeCodeCamp/devdocs
synced 2024-11-16 19:48:10 +01:00
19 lines
601 B
Ruby
19 lines
601 B
Ruby
module Docs
|
|
class Git < UrlScraper
|
|
self.type = 'git'
|
|
self.version = '2.3.1'
|
|
self.base_url = 'http://git-scm.com/docs'
|
|
self.initial_paths = %w(/git.html)
|
|
|
|
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–2015 Linus Torvalds and others<br>
|
|
Licensed under the GNU General Public License version 2.
|
|
HTML
|
|
end
|
|
end
|