diff --git a/css/base.css b/css/base.css index 2d6abb3ed3..e9bb818dc6 100644 --- a/css/base.css +++ b/css/base.css @@ -1 +1,173 @@ -body{padding-top:80px}.container{max-width:970px}#blurb{padding-top:40px}#blurb p{font-size:1.9em}#blurb .btn-group{margin:4px}#multiblurb{line-height:1.7;text-align:center;font-size:12pt}#multiblurb code{border:0;font-size:12pt}#news{font-size:12pt}#news .date{font-style:italic}.tutorial-example{position:relative;margin-bottom:10px}.tutorial-example pre{margin-bottom:0}.tutorial-example a{position:absolute;top:0;right:0;padding:15px 8px;color:#777;font-weight:bold;line-height:10px;font-size:12px;border-left:1px solid #ddd;display:block}.tutorial-example .accordion-body pre{margin:0 4px;border-top:0;border-top-left-radius:0;border-top-right-radius:0}@media print{.tutorial-example a{display:none}}section{padding-top:24px}h3 code{border:0;font-size:20px}@media(max-width:991px){#navcolumn{position:relative !important;margin-bottom:60px}}@media(min-width:992px){#manualcontent{padding-left:280px}}.nav-pills{margin-bottom:20px}.nav-pills li a{padding:8px 12px}.manual-example table{border-top:1px solid #e5e5e5}.manual-example table td{white-space:pre-wrap;font-family:Monaco,Menlo,Consolas,"Courier New",monospace}.manual-example table td.jqprogram{font-weight:bold}.manual-example table th{text-align:right;padding-right:10px}@media print{#navcolumn{display:none !important}.manual-example{display:block !important;height:auto !important}.jqplay-btn{display:none !important}}footer{background-color:#f5f5f5;padding:20px 0;margin-top:40px;color:#999;text-align:center}footer p{margin:8px 0}.twitter-typeahead{width:100%}.tt-menu{width:100%;background-color:#fff;padding:8px 0;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2)}.tt-suggestion{padding:3px 20px}.tt-suggestion:hover{cursor:pointer;color:#fff;background-color:#446e9b}.tt-suggestion.tt-cursor{color:#fff;background-color:#446e9b}.tt-suggestion p{margin:0} \ No newline at end of file +body { + padding-top: 80px; +} + +.container { + max-width: 970px; +} + +/* index.liquid *******************************************/ +#blurb { + padding-top: 40px; +} +#blurb p { + font-size: 1.9em; +} +#blurb .btn-group { + margin: 4px; +} + +#multiblurb { + line-height: 1.7; + text-align: center; + font-size: 12pt; +} +#multiblurb code { + border: 0; + font-size: 12pt; +} + +#news { + font-size: 12pt; +} +#news .date { + font-style: italic; +} + +/* default.liquid *****************************************/ +.tutorial-example { + position: relative; + margin-bottom: 10px; +} +.tutorial-example pre { + margin-bottom: 0px; +} +.tutorial-example a { + position: absolute; + top: 0px; + right: 0px; + padding: 15px 8px; + color: #777777; + font-weight: bold; + line-height: 10px; + font-size: 12px; + border-left: 1px solid #DDDDDD; + display: block; +} +.tutorial-example .accordion-body pre { + margin: 0 4px; + border-top: 0; + border-top-left-radius: 0; + border-top-right-radius: 0; +} + +@media print { + .tutorial-example a { + display: none; + } +} +/* manual.liquid ******************************************/ +section { + padding-top: 24px; +} + +h3 code { + border: 0; + font-size: 20px; +} + +@media (max-width: 991px) { + #navcolumn { + /* Put nav column above manual content */ + position: relative !important; + margin-bottom: 60px; + } +} +@media (min-width: 992px) { + #manualcontent { + /* Put nav column left of manual content */ + padding-left: 280px; + } +} +.nav-pills { + margin-bottom: 20px; +} + .nav-pills li a { + padding: 8px 12px; +} + +.manual-example table { + border-top: 1px solid #E5E5E5; +} +.manual-example table td { + white-space: pre-wrap; + font-family: Monaco, Menlo, Consolas, "Courier New", monospace; +} +.manual-example table td.jqprogram { + font-weight: bold; +} +.manual-example table th { + text-align: right; + padding-right: 10px; +} + +@media print { + #navcolumn { + display: none !important; + } + + .manual-example { + display: block !important; + height: auto !important; + } + + .jqplay-btn { + display: none !important; + } +} +/* shared/_footer.liquid **********************************/ +footer { + background-color: #F5F5F5; + padding: 20px 0; + margin-top: 40px; + color: #999999; + text-align: center; +} +footer p { + margin: 8px 0; +} + +/* typeahead **********************************************/ +.twitter-typeahead { + width: 100%; +} + +.tt-menu { + width: 100%; + background-color: #fff; + padding: 8px 0; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + -webkit-border-radius: 8px; + -moz-border-radius: 8px; + border-radius: 8px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); +} + +.tt-suggestion { + padding: 3px 20px; +} +.tt-suggestion:hover { + cursor: pointer; + color: #fff; + background-color: #446e9b; +} +.tt-suggestion.tt-cursor { + color: #fff; + background-color: #446e9b; +} +.tt-suggestion p { + margin: 0; +} diff --git a/download/index.html b/download/index.html index 863c5c8718..f96d23ea4b 100644 --- a/download/index.html +++ b/download/index.html @@ -18,7 +18,6 @@ - -

Download jq

- -

jq is written in C and has no runtime dependencies, so it should be possible to build it for nearly any platform. Prebuilt binaries are available for Linux, OS X and Windows.

- -

The binaries should just run, but on OS X and Linux you may need to make them executable first using chmod +x jq.

- -

jq is licensed under the MIT license. For all of the gory details, read the file COPYING in the source distribution.

- -

Linux

- +

jq is written in C and has no runtime dependencies, so it should be +possible to build it for nearly any platform. Prebuilt binaries are +available for Linux, OS X and Windows.

+

The binaries should just run, but on OS X and Linux you may need +to make them executable first using chmod +x jq.

+

jq is licensed under the MIT license. For all of the gory +details, read the file COPYING in the source distribution.

+

jq uses a C library for decimal number support. This is an ICU 1.8.1 +licensed code obtained from the ICU downloads archive +http://download.icu-project.org/files/decNumber/decNumber-icu-368.zip.

+

Linux

- -

OS X

- +

OS X

- -

FreeBSD

- +

FreeBSD

- -

Solaris

- +

Solaris

- -

Windows

- +

Windows

- -

Checksums and signatures

- -

SHA-256 checksums are provided for all release and pre-release binaries. They can be found under sig/v1.x/sha256sum.txt. The checksums for jq 1.6 are in sig/v1.6/sha256sum.txt. The checksums for jq 1.5 are in sig/v1.5/sha256sum.txt.

- -

Additionally, all binaries are signed by the jq Package Signing Key. The signatures can be found under sig/v1.x/*.asc. The signatures for jq 1.6 are in sig/v1.5/*.asc. The signatures for jq 1.5 are in sig/v1.5/*.asc. You can use GnuPG to verify a signature by downloading the signature and running gpg --verify signature.asc.

- -

From source on Linux, OS X, Cygwin, and other POSIX-like operating systems

- +

Checksums and signatures

+

SHA-256 checksums are provided for all release and pre-release binaries. +They can be found under +sig/v1.x/sha256sum.txt. +The checksums for jq 1.6 are in +sig/v1.6/sha256sum.txt. +The checksums for jq 1.5 are in +sig/v1.5/sha256sum.txt.

+

Additionally, all binaries are signed by the +jq Package Signing Key. +The signatures can be found under +sig/v1.x/*.asc. +The signatures for jq 1.6 are in +sig/v1.5/*.asc. +The signatures for jq 1.5 are in +sig/v1.5/*.asc. +You can use GnuPG to verify a signature by downloading +the signature and running gpg --verify signature.asc.

+

From source on Linux, OS X, Cygwin, and other POSIX-like operating systems

-

You can build it using the usual ./configure && make && sudo make install rigmarole.

- -

If you’re interested in using the lastest development version, try:

- +

If you're interested in using the lastest development version, try:

git clone https://github.com/stedolan/jq.git
 cd jq
 autoreconf -i
 ./configure --disable-maintainer-mode
 make
-sudo make install
- -

To build it from a git clone, you’ll need to install a few packages first:

- +sudo make install + +

To build it from a git clone, you'll need to install a few +packages first:

- -

For Linux systems, these will all be in your system’s package manager, and if you do development on the machine they’re most likely already installed.

- -

On OS X, these are all included in Apple’s command line tools, which can be installed from Xcode. However, you may find that you need a newer version of Bison than the one provided by Apple. This can be found in Homebrew or MacPorts.

- -

The --disable-maintainer-mode flag says to use the pre-generated lexer and parser that come with the code. To compile the lexer and parser also from source, leave out this flag. You will need to install Flex and Bison.

- -

Building the documentation

- -

jq’s documentation is compiled into static HTML using Bonsai. To view the documentation locally, run rake serve (or bundle exec rake serve) from the docs/ subdirectory. To build the docs just rake build from the docs subdirectory. You’ll need a few Ruby dependencies, which can be installed by following the instructions in docs/README.md.

- -

The man page is built by make jq.1, or just make, also from the YAML docs, and you’ll still need the Ruby dependencies to build the manpage.

- +

For Linux systems, these will all be in your system's package +manager, and if you do development on the machine they're most +likely already installed.

+

On OS X, these are all included in Apple's command line tools, which can +be installed from Xcode. However, +you may find that you need a newer version of Bison than the one provided +by Apple. This can be found in Homebrew or +MacPorts.

+

The --disable-maintainer-mode flag says to use the pre-generated lexer +and parser that come with the code. To compile the lexer and parser also +from source, leave out this flag. You will need to install +Flex and +Bison.

+

Building the documentation

+

jq's documentation is compiled into static HTML using Python. +To build the docs, run pipenv run python3 build_website.py from +the docs/ subdirectory. To serve them locally, you can run +python3 -m SimpleHTTPServer. You'll need a few Python dependencies, +which can be installed by following the instructions in docs/README.md.

+

The man page is built by make jq.1, or just make, also from +the YAML docs, and you'll still need the Python dependencies to +build the manpage.

@@ -234,7 +275,7 @@

Building the documentation

@@ -242,6 +283,5 @@

Building the documentation

- - + \ No newline at end of file diff --git a/index.html b/index.html index ff7646eb8b..6cd76ec611 100644 --- a/index.html +++ b/index.html @@ -18,7 +18,6 @@ - -
@@ -104,15 +102,16 @@ machine of the same type, and expect it to work.

jq can mangle the data format that you have into the one that you want with very little effort, and the program to do so is often -shorter and simpler than you’d expect.

+shorter and simpler than you'd expect.

-

Go read the tutorial for more, or the manual -for way more.

Ask questions on stackoverflow using the jq +

Go read the tutorial for more, or the manual +for way more.

+

Ask questions on stackoverflow using the jq tag, or on the -#jq channel on -Freenode.

+#jq channel on +Freenode.

@@ -122,44 +121,41 @@

News

  • 1 November 2018 - -

    jq 1.6 released. See installation options on the download page, and the release notes for details.

    - +

    jq 1.6 released. See installation options on the download +page, and the release notes +for details.

  • 15 August 2015 - -

    jq 1.5 released, including new datetime, math, and regexp functions, try/catch syntax, array and object destructuring, a streaming parser, and a module system. See installation options on the download page, and the release notes for details.

    - +

    jq 1.5 released, including new datetime, math, and regexp functions, +try/catch syntax, array and object destructuring, a streaming parser, +and a module system. See installation options on the +download page, and the +release notes +for details.

  • 26 July 2015 - -

    jq 1.5rc2 is available. Get it on the releases page.

    - +

    jq 1.5rc2 is available. Get it on the +releases page.

  • 01 January 2015 - -

    jq 1.5rc1 is available. Get it on the releases page.

    - +

    jq 1.5rc1 is available. Get it on the +releases page.

  • 09 June 2014 - -

    jq 1.4 (finally) released! Get it on the download page.

    - +

    jq 1.4 (finally) released! Get it on the download page.

  • 19 May 2013 - -

    jq 1.3 released.

    - +

    jq 1.3 released.

  • @@ -169,7 +165,7 @@

    News

    @@ -177,6 +173,5 @@

    News

    - - + \ No newline at end of file diff --git a/js/manual-search.js b/js/manual-search.js index 8cd2ffa194..e5d6ee53ab 100644 --- a/js/manual-search.js +++ b/js/manual-search.js @@ -1 +1,52 @@ -var section_names=function(q){if(!q){return[]}var matches=[];q=q.toLowerCase();$.each(section_map,function(k,v){if(k.toLowerCase().indexOf(q)!=-1){matches.push(k)}});matches.sort(function(a,b){return a.length-b.length});return matches};var section_names_cb=function(q,cb){cb(section_names(q))};var go_to_section=function(){query=$("#searchbox").val();results=section_names(query);if(results.length==0){return}result=results[0];location.hash="#"+section_map[result];if(result!=query){$("#searchbox").val(result)}};$(function(){$("#searchbox").typeahead({hint:false,highlight:true,minLength:1},{name:"contents",source:section_names_cb,limit:6}).on("typeahead:selected",function(e,data){go_to_section()});$("#searchbox").change(go_to_section)});$(function(){$.each($(".manual-example table"),function(index,value){$value=$(value);var j=$value.find("tr:nth-child(2) td:first").text();var q=$value.find(".jqprogram").text().replace(/^jq /,"").replace(/^'(.+)'$/,"$1");var url="https://jqplay.org/jq?q="+encodeURIComponent(q)+"&j="+encodeURIComponent(j);var $last_tr=$value.find("tr:last");$last_tr.after('Run')})}); \ No newline at end of file +var section_names = function(q) { + if (!q) { + return []; + } + var matches = []; + q = q.toLowerCase(); + $.each(section_map, function(k, v) { + if (k.toLowerCase().indexOf(q) != -1) { + matches.push(k); + } + }); + matches.sort(function(a, b) { + // shortest to longest + return a.length - b.length; + }); + return matches; +} +var section_names_cb = function(q, cb) { + cb(section_names(q)); +} +var go_to_section = function() { + query = $('#searchbox').val(); + results = section_names(query); + if (results.length == 0) { + return; + } + result = results[0]; + location.hash = '#' + section_map[result]; + if (result != query) { + $('#searchbox').val(result); + } +} +$(function(){ + $('#searchbox').typeahead( + {hint: false, highlight: true, minLength: 1}, + {name: "contents", source: section_names_cb, limit: 6} + ).on('typeahead:selected', function(e, data) { + go_to_section(); + }); + $('#searchbox').change(go_to_section); +}); +// add "Run" button to execute examples on jqplay.org +$(function() { + $.each($('.manual-example table'), function(index, value) { + $value = $(value) + var j = $value.find('tr:nth-child(2) td:first').text(); + var q = $value.find('.jqprogram').text().replace(/^jq /, '').replace(/(\r\n|\n|\r)/gm," ").replace(/^'(.+)'$/, '$1'); + var url = 'https://jqplay.org/jq?q=' + encodeURIComponent(q) +'&j=' + encodeURIComponent(j) + var $last_tr = $value.find('tr:last'); + $last_tr.after('Run'); + }); +}); diff --git a/manual/index.html b/manual/index.html index f1abd39f5e..0986130c50 100644 --- a/manual/index.html +++ b/manual/index.html @@ -18,7 +18,6 @@ - -