File tree Expand file tree Collapse file tree
assets/javascripts/templates/pages Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -416,6 +416,11 @@ credits = [
416416 ' 2007-2021 Pallets' ,
417417 ' BSD' ,
418418 ' https://github.com/pallets/jinja/blob/master/LICENSE.rst'
419+ ], [
420+ ' jq' ,
421+ ' Stephen Dolan' ,
422+ ' CC-BY-3.0' ,
423+ ' https://github.com/stedolan/jq/blob/master/COPYING#L24-L28'
419424 ], [
420425 ' jQuery' ,
421426 ' Packt Publishing<br>© jQuery Foundation and other contributors' ,
Original file line number Diff line number Diff line change 1+ module Docs
2+ class Jq
3+ class CleanHtmlFilter < Filter
4+ def call
5+ at_css ( 'div#manualcontent' )
6+ end
7+ end
8+ end
9+ end
Original file line number Diff line number Diff line change 1+ module Docs
2+ class Jq
3+ class EntriesFilter < Docs ::EntriesFilter
4+ def include_default_entry?
5+ false
6+ end
7+
8+ def additional_entries
9+ entries = [ ]
10+ css ( '#manualcontent > section' ) . each do |node |
11+ type = node . at_css ( 'h2' ) . content
12+ node . css ( '> section' ) . each do |n |
13+ entries << [ n . at_css ( 'h3' ) . content , n [ 'id' ] , type ]
14+ end
15+ end
16+ return entries
17+ end
18+ end
19+ end
20+ end
Original file line number Diff line number Diff line change 1+ module Docs
2+ class Jq < UrlScraper
3+ self . name = 'jq'
4+ self . slug = 'jq'
5+ self . type = 'simple'
6+ self . release = '1.6'
7+ self . links = {
8+ home : 'https://stedolan.github.io/jq/'
9+ }
10+
11+ self . base_url = "https://stedolan.github.io/jq/manual/v#{ self . release } /index.html"
12+
13+ html_filters . push 'jq/entries' , 'jq/clean_html'
14+
15+ options [ :skip_links ] = true
16+
17+ options [ :attribution ] = <<-HTML
18+ © 2012 Stephen Dolan< br >
19+ Licensed under the < a href ="https://creativecommons.org/licenses/by/3.0/ "> Creative Commons Attribution 3.0 license</ a >
20+ HTML
21+
22+ def get_latest_version ( opts )
23+ get_latest_github_release ( 'stedolan' , 'jq' , opts ) . split ( '-' ) [ 1 ]
24+ end
25+
26+ end
27+ end
Original file line number Diff line number Diff line change 1+ https://stedolan.github.io/jq/jq.png
You can’t perform that action at this time.
0 commit comments