summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Tolnay <dtolnay@gmail.com>2015-07-23 21:26:18 -0700
committerDavid Tolnay <dtolnay@gmail.com>2015-07-23 21:51:30 -0700
commit81f328f1aa153462d67bc79e97e35c98960cf61b (patch)
tree7f51f27b220480d73b95c89d29ab5341e0eba7f7
parentf5a7bba986d82e0dfc5fd7bce2b8ed78a5b970b5 (diff)
Copy over changes made to gh-pages directly
This includes the following commits from the gh-pages branch: - 63e80b8 - d24a397 - 9796cd6 - ee21707 - ccb0f1d - 200e6b3 - 64134c0 - 57152d2 - 8ffbfa3
-rw-r--r--docs/content/1.tutorial/default.yml6
-rw-r--r--docs/content/2.download/default.yml14
-rw-r--r--docs/content/3.manual/manual.yml16
-rw-r--r--docs/content/index/index.yml26
-rw-r--r--docs/templates/index.liquid2
-rw-r--r--docs/templates/manual.liquid11
6 files changed, 52 insertions, 23 deletions
diff --git a/docs/content/1.tutorial/default.yml b/docs/content/1.tutorial/default.yml
index c05211bb..43097f3a 100644
--- a/docs/content/1.tutorial/default.yml
+++ b/docs/content/1.tutorial/default.yml
@@ -150,7 +150,7 @@ body:
- text: |
- For the rest of the examples, I'll leave out the `curl` command—it's not going to change.
+ For the rest of the examples, I'll leave out the `curl` command - it's not going to change.
There's still a lot of info we don't care about there, so we'll
restrict it down to the most interesting fields.
@@ -203,12 +203,12 @@ body:
one at a time, which are all fed into `{message: .commit.message, name: .commit.committer.name}`.
- Data in jq is represented as streams of JSON values—every jq
+ Data in jq is represented as streams of JSON values - every jq
expression runs for each value in its input stream, and can
produce any number of values to its output stream.
Streams are serialised by just separating JSON values with
- whitespace. This is a `cat`-friendly format—you can just join
+ whitespace. This is a `cat`-friendly format - you can just join
two JSON streams together and get a valid JSON stream.
If you want to get the output as a single array, you can tell jq to
diff --git a/docs/content/2.download/default.yml b/docs/content/2.download/default.yml
index 0eed9e0b..c5ba5072 100644
--- a/docs/content/2.download/default.yml
+++ b/docs/content/2.download/default.yml
@@ -30,6 +30,9 @@ body:
* jq 1.4 is [in Debian](http://packages.debian.org/jq)
+ * jq 1.3.2 is in the official Fedora repository. You can install using
+ `sudo yum install jq`.
+
### OS X
* `brew install jq` using [homebrew](http://mxcl.github.com/homebrew/)
@@ -40,18 +43,23 @@ body:
* Or, grab prebuilt jq 1.3 [64-bit binaries](osx64/jq-1.3/jq) or [32-bit
binaries](osx32/jq-1.3/jq)
- ### Solaris 11
+ ### Solaris
+
+ * `pkgutil -i jq` in [OpenCSW](http://www.opencsw.org/p/jq) for Solaris 10+, Sparc and x86
- * jq 1.4 executables for [64-bit](solaris11-64/jq) or [32-bit](solaris11-32/jq)
+ * jq 1.4 executables for Solaris 11 [64-bit](solaris11-64/jq) or [32-bit](solaris11-32/jq)
### Windows
+ * `chocolatey install jq` using [Chocolatey NuGet](https://chocolatey.org/)
+
* jq 1.4 executables for [64-bit](win64/jq.exe) or [32-bit](win32/jq.exe)
+
* jq 1.3 executables for [64-bit](win64/jq-1.3/jq.exe) or [32-bit](win32/jq-1.3/jq.exe)
### From source on Linux, OS X, Cygwin, and other POSIX-like operating systems
- * [Source tarball for jq $JQ_VERSION](source/jq-$JQ_VERSION.tar.gz)
+ * [Source tarball for jq 1.4](source/jq-1.4.tar.gz)
You can build it using the usual `./configure && make && sudo
make install` rigmarole.
diff --git a/docs/content/3.manual/manual.yml b/docs/content/3.manual/manual.yml
index a6bfae25..37a710b1 100644
--- a/docs/content/3.manual/manual.yml
+++ b/docs/content/3.manual/manual.yml
@@ -973,7 +973,7 @@ sections:
input: '[]'
output: ["true"]
- - title: "`flatten`, `flatten(depth)`"
+ - title: "\\[Requires 1.5\\] `flatten`, `flatten(depth)`"
body: |
The filter `flatten` takes as input an array of nested arrays,
@@ -1989,7 +1989,7 @@ sections:
evaluates to: true, true, false, false.
entries:
- - title: "`test(val)`, `test(regex; flags)`"
+ - title: "\\[Requires 1.5\\] `test(val)`, `test(regex; flags)`"
body: |
Like `match`, but does not return match objects, only `true` or `false`
@@ -2003,7 +2003,7 @@ sections:
input: '["xabcd", "ABC"]'
output: ['true', 'true']
- - title: "`match(val)`, `match(regex; flags)`"
+ - title: "\\[Requires 1.5\\] `match(val)`, `match(regex; flags)`"
body: |
**match** outputs an object for each match it finds. Matches have
@@ -2048,7 +2048,7 @@ sections:
output: [3]
- - title: "`capture(val)`, `capture(regex; flags)`"
+ - title: "\\[Requires 1.5\\] `capture(val)`, `capture(regex; flags)`"
body: |
Collects the named captures in a JSON object, with the name
@@ -2060,7 +2060,7 @@ sections:
input: '"xyzzy-14"'
output: ['{ "a": "xyzzy", "n": "14" }']
- - title: "`scan(regex)`, `scan(regex; flags)`"
+ - title: "\\[Requires 1.5\\] `scan(regex)`, `scan(regex; flags)`"
body: |
Emit a stream of the non-overlapping substrings of the input
@@ -2089,7 +2089,7 @@ sections:
output: ['"ab","cd","ef"']
- - title: "`splits(regex)`, `splits(regex; flags)`"
+ - title: "\\[Requires 1.5\\] `splits(regex)`, `splits(regex; flags)`"
body: |
These provide the same results as their `split` counterparts,
@@ -2100,7 +2100,7 @@ sections:
input: '("ab,cd", "ef, gh")'
output: ['"ab"', '"cd"', '"ef"', '"gh"']
- - title: "`sub(regex; tostring)` `sub(regex; string; flags)`"
+ - title: "\\[Requires 1.5\\] `sub(regex; tostring)` `sub(regex; string; flags)`"
body: |
Emit the string obtained by replacing the first match of regex in the
@@ -2116,7 +2116,7 @@ sections:
output: '"ZabcZabc"'
- - title: "`gsub(regex; string)`, `gsub(regex; string; flags)`"
+ - title: "\\[Requires 1.5\\] `gsub(regex; string)`, `gsub(regex; string; flags)`"
body: |
`gsub` is like `sub` but all the non-overlapping occurrences of the regex are
diff --git a/docs/content/index/index.yml b/docs/content/index/index.yml
index 40471927..241eb91f 100644
--- a/docs/content/index/index.yml
+++ b/docs/content/index/index.yml
@@ -1,10 +1,9 @@
headline: jq
blurb: |
-
- jq is a lightweight and flexible command-line JSON processor with
- support for regular expressions.
-
+
+ jq is a lightweight and flexible command-line JSON processor.
+
body1: |
jq is like `sed` for JSON data - you can use it to slice and filter
@@ -22,19 +21,30 @@ body3: |
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.
-
+
tail: |
+
Go read the [tutorial](tutorial/) for more, or the [manual](manual/)
- for *way* more.
+ for *way* more. Ask questions over on
+ [stackoverflow](http://stackoverflow.com/) using the [jq
+ tag](http://stackoverflow.com/questions/tagged/jq), or on the
+ [#jq](http://irc.lc/freenode/%23jq/) channel over on
+ [Freenode](https://webchat.freenode.net/).
news:
+ - date: 2015-01-01
+ body: |
+
+ jq 1.5rc1 Get it on the
+ [releases](https://github.com/stedolan/jq/releases) page.
+
- date: 2014-06-08
body: |
-
+
jq 1.4 (finally) released! Get it on the [download](download/) page.
- date: 2013-05-19
body: |
-
+
jq 1.3 released.
diff --git a/docs/templates/index.liquid b/docs/templates/index.liquid
index e3608e3b..17b77b70 100644
--- a/docs/templates/index.liquid
+++ b/docs/templates/index.liquid
@@ -27,7 +27,7 @@
<div class="btn-group" style="float:right">
<a class="btn btn-primary" href="http://jqplay.org">
- Try online!
+ Try online at jqplay.org!
</a>
</div>
diff --git a/docs/templates/manual.liquid b/docs/templates/manual.liquid
index 33b8654b..e17eda82 100644
--- a/docs/templates/manual.liquid
+++ b/docs/templates/manual.liquid
@@ -35,6 +35,17 @@
}
});
});
+ // add "Run" button to execute examples on jqplay.org
+ $(function() {
+ $.each($('table.manual-example'), 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('<tr><th><a href="' + url + '" class="btn btn-primary btn-small">Run</a></th><th></th></tr><tr><th></th><th></th></tr>');
+ });
+ });
</script>
<input type="text"
class="input-medium search-query"