use jstrdecode, removed unicode-fix.sed & unicode-chk.sh
Use ``jstrdecode(1)` to decode certain JSON strings, such as "Full Name", "Abstract", "Award" and "Organization". We now rely on a correctly decoding `jstrdecode(1)`. The bin tools now rely on `jstrdecode` with the following version or later: > jstrdecode version: 1.0.6 2024-10-08 > JSON parser version: 1.1.7 2024-10-08 Removed `bin/unicode-fix.sed` and `bin/unicode-chk.sh`. Removed `make unicode_chk`. Fixed a few rule dependencies on `Makefile`. Added information about `bin/jval-wrapper.sh` in `bin/README.md`. Changed `bin/csv2entry.sh` VERSION from "1.4 2024-09-27" to "1.5 2024-10-08". Changed `bin/entry2csv.sh` VERSION from "1.4 2024-09-27" to "1.5 2024-10-08". Changed `bin/gen-authors.sh` VERSION from "1.13 2024-09-23" to "1.14 2024-10-08". Changed `bin/gen-location.sh` VERSION from "1.7 2024-09-23" to "1.8 2024-10-08". Changed `bin/gen-years.sh` VERSION from "1.5 2024-09-23" to "1.6 2024-10-08". Changed `bin/jfmt-wrapper.sh` VERSION from "1.2 2024-09-23" to "1.3 2024-10-08". Changed `bin/jprint-wrapper.sh` VERSION from "1.3 2024-09-23" to "1.4 2024-10-08". Changed `bin/jval-wrapper.sh` VERSION from "1.1 2024-09-23" to "1.2 2024-10-08". Changed `bin/output-index-author.sh` VERSION from "1.9 2024-09-23" to "1.10 2024-10-08". Changed `bin/output-year-index.sh` VERSION from "1.5 2024-09-23" to "1.6 2024-10-08". Changed `bin/subst.entry-index.sh` VERSION from "1.7 2024-09-27" to "1.8 2024-10-08". Perform `make www` to perform the above and test under macOS.
This commit is contained in:
1 parent
c1e09c4097
commit
5c060586e6
16 files changed
+382
-1149
No files matched your search
+39
-2
@@ -735,7 +735,7 @@ do that, that is not a problem.</p>
|
||||
<p>The <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/bin/jfmt-wrapper.sh">jfmt-wrapper.sh</a> tool is a wrapper
|
||||
tool for <code>jfmt(1)</code>, a tool that will format a JSON
|
||||
# file into a canonical style.</p>
|
||||
<p>NOTE: As of 2024 July 28 the <code>jfmt(1)</code> tool has not been written,
|
||||
<p>NOTE: As of 2024 Oct 08 the <code>jfmt(1)</code> tool has not been written,
|
||||
so <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/bin/jfmt-wrapper.sh">jfmt-wrapper.sh</a> uses the
|
||||
<code>JSONPath.sh(1)</code> tool from the recently forked and modified
|
||||
<a href="https://github.com/lcn2/JSONPath.sh">JSONPath.sh tool</a>.</p>
|
||||
@@ -748,7 +748,7 @@ so <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/bin/jfmt-wr
|
||||
tool for <code>jprint(1)</code>, a tool that will format JSON in a canonical style
|
||||
to stdout.</p>
|
||||
<p>NOTE: <code>jprint(1)</code> is a planned tool based on <code>jfmt(1)</code>.
|
||||
As of 2024 July 28 that tool has not been written, so
|
||||
As of 2024 Oct 08 that tool has not been written, so
|
||||
<a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/bin/jprint-wrapper.sh">jprint-wrapper.sh</a> uses
|
||||
the <code>JSONPath.sh(1)</code> tool from the recently forked and modified
|
||||
<a href="https://github.com/lcn2/JSONPath.sh">JSONPath.sh tool</a>.</p>
|
||||
@@ -756,6 +756,43 @@ the <code>JSONPath.sh(1)</code> tool from the recently forked and modified
|
||||
<pre><code> bin/jprint-wrapper.sh .entry.json</code></pre>
|
||||
<p>Or use in a pipe:</p>
|
||||
<pre><code> cat .info.json | bin/jprint-wrapper.sh</code></pre>
|
||||
<div id="jval-wrapper">
|
||||
<h3 id="jval-wrapper.sh"><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/bin/jval-wrapper.sh">jval-wrapper.sh</a></h3>
|
||||
</div>
|
||||
<p>The <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/bin/jval-wrapper.sh">jval-wrapper.sh</a> tool is a wrapper
|
||||
tool for <code>jval(1)</code>, a tool that will output a JSON value using the
|
||||
XPath for JSON mechanism. For information in XPath for JSON see:</p>
|
||||
<ul>
|
||||
<li><a href="https://goessner.net/articles/JsonPath/">https://goessner.net/articles/JsonPath/</a></li>
|
||||
<li><a href="https://jsonpath.com">https://jsonpath.com</a></li>
|
||||
<li><a href="https://github.com/lcn2/JSONPath.sh?tab=readme-ov-file#jsonpath-patterns-and-extensions">https://github.com/lcn2/JSONPath.sh?tab=readme-ov-file#jsonpath-patterns-and-extensions</a></li>
|
||||
</ul>
|
||||
<p>NOTE: As of 2024 Oct 08 the <code>jval(1)</code> tool has not been written,
|
||||
so <a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/bin/jval-wrapper.sh">jval-wrapper.sh</a> uses the
|
||||
<code>jsp(1)</code> tool from <a href="//github.com/kjozsa/jsp">//github.com/kjozsa/jsp</a>
|
||||
or if not found, the <code>JSONPath.sh(1)</code> tool from the recently forked and modified
|
||||
<a href="https://github.com/lcn2/JSONPath.sh">JSONPath.sh tool</a>.</p>
|
||||
<p>Usage:</p>
|
||||
<pre><code> bin/jval-wrapper.sh [-b] [-q] [-T] file.json [pattern]
|
||||
|
||||
-b print only values (def: print both JSON member and JSON value)
|
||||
-q remove enclosing double quotes (def: keep any enclosing double quotes)
|
||||
-T trim all newlines (def: do not)
|
||||
|
||||
file.json JSON file to process, - ==> read stdin
|
||||
pattern Xpath for JSON query pattern</code></pre>
|
||||
<p>For example:</p>
|
||||
<pre><code> bin/jval-wrapper.sh 1984/mullender/.entry.json '$.award'
|
||||
bin/jval-wrapper.sh 1984/mullender/.entry.json '$..author_handle'
|
||||
|
||||
bin/jval-wrapper.sh 1984/mullender/.entry.json '$.manifest[2]'
|
||||
bin/jval-wrapper.sh -q 1984/mullender/.entry.json '$.manifest[2]'
|
||||
|
||||
bin/jval-wrapper.sh -b 1984/mullender/.entry.json '$.manifest[2].entry_text'
|
||||
bin/jval-wrapper.sh -b -q 1984/mullender/.entry.json '$.manifest[2].inventory_order'
|
||||
|
||||
bin/jval-wrapper.sh author/Anton_Algmyr.json '$.full_name'
|
||||
bin/jval-wrapper.sh -q -T author/Anton_Algmyr.json '$.full_name' | jstrdecode -</code></pre>
|
||||
<div id="md2html_cfg">
|
||||
<h3 id="md2html.cfg"><a href="https://github.com/ioccc-src/temp-test-ioccc/blob/master/bin/md2html.cfg">md2html.cfg</a></h3>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user