devdocs/lib/docs/scrapers/jq.rb

29 lines
727 B
Ruby
Raw Permalink Normal View History

2019-11-30 23:54:35 +01:00
module Docs
class Jq < UrlScraper
self.name = 'jq'
self.slug = 'jq'
self.type = 'jq'
2023-10-09 21:24:34 +02:00
self.release = '1.7'
2019-11-30 23:54:35 +01:00
self.links = {
2023-10-09 21:24:34 +02:00
home: 'https://jqlang.github.io/jq/'
2019-11-30 23:54:35 +01:00
}
2023-10-09 21:24:34 +02:00
self.base_url = "https://jqlang.github.io/jq/manual/v#{self.release}/index.html"
2019-11-30 23:54:35 +01:00
html_filters.push 'jq/entries', 'jq/clean_html'
2023-10-09 21:24:34 +02:00
options[:container] = 'main'
2019-11-30 23:54:35 +01:00
options[:skip_links] = true
options[:attribution] = <<-HTML
&copy; 2012 Stephen Dolan<br>
Licensed under the <a href="https://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 license</a>
HTML
2021-05-26 21:27:50 +02:00
def get_latest_version(opts)
get_latest_github_release('stedolan', 'jq', opts).split('-')[1]
end
2019-11-30 23:54:35 +01:00
end
end