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:
Landon Curt Noll committed 2024-10-08 23:12:04 -07:00
1 parent c1e09c4097
commit 5c060586e6
16 files changed
+382 -1149

No files matched your search

+4 -21
View File
@@ -110,7 +110,7 @@ shopt -s globstar # enable ** to match all files and zero or more directories an
# set variables referenced in the usage message
#
export VERSION="1.3 2024-09-23"
export VERSION="1.4 2024-10-08"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -126,6 +126,7 @@ if [[ $status -eq 0 ]]; then
TOPDIR=$("$GIT_TOOL" rev-parse --show-toplevel)
fi
export TOPDIR
#
export REPO_TOP_URL="https://github.com/ioccc-src/temp-test-ioccc"
# GitHub puts individual files under the "blob/master" sub-directory.
export REPO_URL="$REPO_TOP_URL/blob/master"
@@ -326,23 +327,6 @@ fi
export BIN_DIR="bin"
# verify that the bin/unicode-fix.sed tool is executable
#
export UNICODE_FIX_SED="$BIN_DIR/unicode-fix.sed"
if [[ ! -e $UNICODE_FIX_SED ]]; then
echo "$0: ERROR: bin/unicode-fix.sed does not exist: $UNICODE_FIX_SED" 1>&2
exit 5
fi
if [[ ! -f $UNICODE_FIX_SED ]]; then
echo "$0: ERROR: bin/unicode-fix.sed is not a regular file: $UNICODE_FIX_SED" 1>&2
exit 5
fi
if [[ ! -r $UNICODE_FIX_SED ]]; then
echo "$0: ERROR: bin/unicode-fix.sed is not an readable file: $UNICODE_FIX_SED" 1>&2
exit 5
fi
# validate the XPath for JSON tool
#
case "$XPATHJSON_USE" in
@@ -446,7 +430,6 @@ if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: CD_FAILED=$CD_FAILED" 1>&2
echo "$0: debug[3]: BIN_PATH=$BIN_PATH" 1>&2
echo "$0: debug[3]: BIN_DIR=$BIN_DIR" 1>&2
echo "$0: debug[3]: UNICODE_FIX_SED=$UNICODE_FIX_SED" 1>&2
fi
@@ -485,7 +468,7 @@ case "$XPATHJSON_USE" in
echo "$0: debug[3]: about to: $JSP_TOOL --indent 4 --format --no-color | sed ..." 1>&2
fi
"$JSP_TOOL" --indent 4 --format --no-color |
sed -f "$UNICODE_FIX_SED" -e 's/\(\S\): /\1 : /'
sed -e 's/\(\S\): /\1 : /'
status_codes=("${PIPESTATUS[@]}")
if [[ ${status_codes[*]} =~ [1-9] ]]; then
echo "$0: ERROR: $JSP_TOOL --indent 4 --format --no-color | sed ... failed", \
@@ -500,7 +483,7 @@ case "$XPATHJSON_USE" in
echo "$0: debug[3]: about to: $JSP_TOOL --indent 4 --format --no-color < $JSON_FILE | sed ..." 1>&2
fi
"$JSP_TOOL" --indent 4 --format --no-color < "$JSON_FILE" |
sed -f "$UNICODE_FIX_SED" -e 's/\(\S\): /\1 : /'
sed -e 's/\(\S\): /\1 : /'
status_codes=("${PIPESTATUS[@]}")
if [[ ${status_codes[*]} =~ [1-9] ]]; then
echo "$0: ERROR: $JSP_TOOL --indent 4 --format --no-color < $JSON_FILE | sed ... failed", \