Add basic scraper and friends that doesn't blow up

pull/876/head
Boris Bera 6 years ago
parent 24abe4c9d9
commit 9d60cc80f5

@ -0,0 +1,9 @@
module Docs
class SaltStack
class CleanHtmlFilter < Filter
def call
doc
end
end
end
end

@ -0,0 +1,13 @@
module Docs
class SaltStack
class EntriesFilter < Docs::EntriesFilter
def get_name
at_css('h1').content
end
def get_type
'TODO'
end
end
end
end

@ -0,0 +1,14 @@
module Docs
class SaltStack < UrlScraper
self.release = '2018.3.2'
self.base_url = 'https://docs.saltstack.com/en/latest/ref/'
html_filters.push 'salt_stack/entries', 'salt_stack/clean_html'
options[:container] = '.body-content'
options[:attribution] = <<-HTML
&copy; 2018 SaltStack. All Rights Reserved, SaltStack Inc.
HTML
end
end
Loading…
Cancel
Save