Unified · Split
| @@ -0,0 +1,9 @@ | ||
| 1 | +module Docs | |
| 2 | + class Brew | |
| 3 | + class CleanHtmlFilter < Filter | |
| 4 | + def call | |
| 5 | + doc | |
| 6 | + end | |
| 7 | + end | |
| 8 | + end | |
| 9 | +end | |
| @@ -0,0 +1,14 @@ | ||
| 1 | +module Docs | |
| 2 | + class Brew | |
| 3 | + class EntriesFilter < Docs::EntriesFilter | |
| 4 | + def get_name | |
| 5 | + at_css('h1').content | |
| 6 | + end | |
| 7 | + | |
| 8 | + def get_type | |
| 9 | + name | |
| 10 | + end | |
| 11 | + | |
| 12 | + end | |
| 13 | + end | |
| 14 | +end | |
| @@ -0,0 +1,22 @@ | ||
| 1 | +module Docs | |
| 2 | + class Brew < UrlScraper | |
| 3 | + self.name = 'Homebrew' | |
| 4 | + self.type = 'brew' | |
| 5 | + self.release = '1.3.6' | |
| 6 | + self.base_url = 'https://docs.brew.sh' | |
| 7 | + self.root_path = '/' | |
| 8 | + self.links = { | |
| 9 | + home: 'https://brew.sh', | |
| 10 | + code: 'https://github.com/Homebrew/brew' | |
| 11 | + } | |
| 12 | + | |
| 13 | + options[:container] = ->(filter) { filter.root_page? ? '#home' : '#page' } | |
| 14 | + | |
| 15 | + html_filters.push 'brew/entries', 'brew/clean_html' | |
| 16 | + | |
| 17 | + options[:attribution] = <<-HTML | |
| 18 | + Homebrew was created by Max Howell. <br> | |
| 19 | + Licensed under the BSD 2-Clause License. | |
| 20 | + HTML | |
| 21 | + end | |
| 22 | +end | |
Binary file not shown.
Binary file not shown.
Binary file not shown.