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.
devdocs/lib/docs/scrapers/redis.rb

24 lines
708 B

module Docs
class Redis < UrlScraper
self.type = 'redis'
self.release = '5.0.0'
self.base_url = 'https://redis.io/commands'
self.links = {
home: 'https://redis.io/',
code: 'https://github.com/antirez/redis'
}
html_filters.push 'redis/entries', 'redis/clean_html', 'title'
options[:container] = ->(filter) { filter.root_page? ? '#commands' : '.text' }
options[:title] = false
options[:root_title] = 'Redis'
options[:follow_links] = ->(filter) { filter.root_page? }
options[:attribution] = <<-HTML
&copy; 2009&ndash;2018 Salvatore Sanfilippo<br>
Licensed under the Creative Commons Attribution-ShareAlike License 4.0.
HTML
end
end