From 38ecf1f280ed1c81b45df65f53390a5994105a62 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Thu, 14 Nov 2024 13:00:19 -0800 Subject: [PATCH] Swap out (again) jstrencode for jstrdecode This happened because when focusing on a bug for several days that had to do with decoding code points (which so happens to be encoding but in JSON it should be converted to unicode even when decoding) I lost sight of the fact that jstrencode is meant to be **JSON** encoder. In the process of this I have uncovered a number of other bugs but that's with jstrencode and the website uses jstrdecode so this should not delay the contest at all. --- bin/README.md | 4 +- bin/cvt-submission.sh | 74 ++++++++++++++++++------------------- bin/entry2csv.sh | 32 ++++++++-------- bin/gen-authors.sh | 36 +++++++++--------- bin/gen-location.sh | 28 +++++++------- bin/gen-years.sh | 28 +++++++------- bin/index.html | 4 +- bin/manifest.entry.json.awk | 26 ++++++------- bin/output-index-author.sh | 30 +++++++-------- bin/output-year-index.sh | 32 ++++++++-------- bin/subst.default.sh | 2 +- bin/subst.entry-index.sh | 38 +++++++++---------- 12 files changed, 167 insertions(+), 167 deletions(-) diff --git a/bin/README.md b/bin/README.md index feb6dc90c..2fdf003bb 100644 --- a/bin/README.md +++ b/bin/README.md @@ -806,10 +806,10 @@ For example: 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' | jstrencode - + bin/jval-wrapper.sh -q -T author/Anton_Algmyr.json '$.full_name' | jstrdecode - ``` -**NOTE**: With `jstrencode(1)` version 1.2.3 or better, one can use `jstrencode -N` +**NOTE**: With `jstrdecode(1)` version 1.2.3 or better, one can use `jstrdecode -N` and not have to use `-T` with `bin/jval-wrapper.sh`. diff --git a/bin/cvt-submission.sh b/bin/cvt-submission.sh index 38c2818b6..fe099fd72 100755 --- a/bin/cvt-submission.sh +++ b/bin/cvt-submission.sh @@ -119,10 +119,10 @@ if [[ -z "$CHKENTRY_TOOL" ]]; then exit 5 fi # -JSTRENCODE_TOOL=$(type -P jstrencode) -export JSTRENCODE_TOOL -if [[ -z "$JSTRENCODE_TOOL" ]]; then - echo "$0: FATAL: jstrencode tool is not installed or not in \$PATH" 1>&2 +JSTRDECODE_TOOL=$(type -P jstrdecode) +export JSTRDECODE_TOOL +if [[ -z "$JSTRDECODE_TOOL" ]]; then + echo "$0: FATAL: jstrdecode tool is not installed or not in \$PATH" 1>&2 echo "$0: Notice: if needed: $GIT_TOOL clone $MKIOCCCENTRY_REPO; cd mkiocccentry" 1>&2 echo "$0: Notice: then if needed: make clobber all install" 1>&2 exit 5 @@ -163,16 +163,16 @@ export X_3="X""X""X" # usage # export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] - [-c chkeckentry] [-j jstrencode] [-s jstrencode] - [-T tarball_dir] [-i input_data] [-n] [-N] YYYY/dir + [-c chkentry] [-j jstrdecode] [-T tarball_dir] + [-i input_data] [-n] [-N] YYYY/dir -h print help message and exit -v level set verbosity level (def level: 0) -V print version string and exit -d topdir set topdir (def: $TOPDIR) - -c chkeckentry path to the chkentry tool (def: $CHKENTRY_TOOL) - -s jstrencode path to the jstrencode tool (def: $JSTRENCODE_TOOL) + -c chkentry path to the chkentry tool (def: $CHKENTRY_TOOL) + -j jstrdecode path to the jstrdecode tool (def: $JSTRDECODE_TOOL) -T tarball_dir where to form the compressed tarball of modified files (def: $TARBALL_DIR) @@ -199,7 +199,7 @@ $NAME version: $VERSION" # prompt_string # -# Prompt the user for a string and output as an encoded JSON string. +# Prompt the user for a string and output as an decoded JSON string. # # If "-i input_data: is used, the printing of the prompt is disabled, # and the query of correctness is also disabled. @@ -214,7 +214,7 @@ $NAME version: $VERSION" function prompt_string { local INPUT; # user input - local ENCODED; # INPUT encoded as JSON string + local DECODED; # INPUT decoded as JSON string local Y_OR_N; # y or n local ITEM_NAME; # name of the item being prompted for @@ -246,21 +246,21 @@ function prompt_string continue fi - # JSON encode value + # JSON decode value # - ENCODED=$("$JSTRENCODE_TOOL" -q -n -- "$INPUT") + DECODED=$("$JSTRDECODE_TOOL" -q -n -- "$INPUT") status="$?" - if [[ $status -ne 0 || -z $ENCODED ]]; then - echo "$0: ERROR: in prompt_string: $JSTRENCODE_TOOL -q -n -- $INPUT failed," \ + if [[ $status -ne 0 || -z $DECODED ]]; then + echo "$0: ERROR: in prompt_string: $JSTRDECODE_TOOL -q -n -- $INPUT failed," \ "error code: $status" 1>&2 exit 1 fi - # verify JSON encoded value + # verify JSON decoded value # if [[ -z $INPUT_DATA_FILE ]]; then echo - echo "Verify encoded $ITEM_NAME: $ENCODED" 1>&2 + echo "Verify decoded $ITEM_NAME: $DECODED" 1>&2 echo echo -n 'Is that correct? [y,N]: ' read -r Y_OR_N @@ -276,16 +276,16 @@ function prompt_string echo fi - # set VALUE to the JSON encoded string + # set VALUE to the JSON decoded string # - VALUE="$ENCODED" + VALUE="$DECODED" return 0 } # prompt_integer # -# Prompt the user for an integer and output as an encoded JSON string. +# Prompt the user for an integer and output as an decoded JSON string. # # If "-i input_data: is used, the printing of the prompt is disabled, # and the query of correctness is also disabled. @@ -300,7 +300,7 @@ function prompt_string function prompt_integer { local INPUT; # user input - local ENCODED; # INPUT encoded as JSON string + local DECODED; # INPUT decoded as JSON string local Y_OR_N; # y or n local ITEM_NAME; # name of the item being prompted for @@ -332,12 +332,12 @@ function prompt_integer continue fi if [[ $INPUT =~ ^[[:digit:]]+$ && $INPUT -ge 0 && $INPUT -le 4294967295 ]]; then - # JSON encode value + # JSON decode value # - ENCODED=$("$JSTRENCODE_TOOL" -q -n -- "$INPUT") + DECODED=$("$JSTRDECODE_TOOL" -q -n -- "$INPUT") status="$?" - if [[ $status -ne 0 || -z $ENCODED ]]; then - echo "$0: ERROR: in prompt_integer: $JSTRENCODE_TOOL -q -n -- $INPUT failed," \ + if [[ $status -ne 0 || -z $DECODED ]]; then + echo "$0: ERROR: in prompt_integer: $JSTRDECODE_TOOL -q -n -- $INPUT failed," \ "error code: $status" 1>&2 exit 1 fi @@ -347,11 +347,11 @@ function prompt_integer continue fi - # verify JSON encoded value + # verify JSON decoded value # if [[ -z $INPUT_DATA_FILE ]]; then echo - echo "Verify encoded $ITEM_NAME: $ENCODED" 1>&2 + echo "Verify decoded $ITEM_NAME: $DECODED" 1>&2 echo echo -n 'Is that correct? [y,N]: ' read -r Y_OR_N @@ -367,9 +367,9 @@ function prompt_integer echo fi - # set VALUE to the JSON encoded string + # set VALUE to the JSON decoded string # - VALUE="$ENCODED" + VALUE="$DECODED" return 0 } @@ -737,7 +737,7 @@ while getopts :hv:Vd:c:s:i:T:nN flag; do ;; c) CHKENTRY_TOOL="$OPTARG" ;; - s) JSTRENCODE_TOOL="$OPTARG" + s) JSTRDECODE_TOOL="$OPTARG" ;; i) INPUT_DATA_FILE="$OPTARG" ;; @@ -1019,7 +1019,7 @@ if [[ $V_FLAG -ge 3 ]]; then echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2 echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2 echo "$0: debug[3]: CHKENTRY_TOOL=$CHKENTRY_TOOL" 1>&2 - echo "$0: debug[3]: JSTRENCODE_TOOL=$JSTRENCODE_TOOL" 1>&2 + echo "$0: debug[3]: JSTRDECODE_TOOL=$JSTRDECODE_TOOL" 1>&2 echo "$0: debug[3]: GTAR_TOOL=$GTAR_TOOL" 1>&2 echo "$0: debug[3]: REPO_TOP_URL=$REPO_TOP_URL" 1>&2 echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2 @@ -1111,22 +1111,22 @@ if [[ ! -x $CHKENTRY_TOOL ]]; then fi -# firewall - verify jstrencode tool +# firewall - verify jstrdecode tool # -if [[ ! -e $JSTRENCODE_TOOL ]]; then - echo "$0: ERROR: jstrencode file does not exist: $JSTRENCODE_TOOL" 1>&2 +if [[ ! -e $JSTRDECODE_TOOL ]]; then + echo "$0: ERROR: jstrdecode file does not exist: $JSTRDECODE_TOOL" 1>&2 echo "$0: Notice: if needed: $GIT_TOOL clone $MKIOCCCENTRY_REPO; cd mkiocccentry" 1>&2 echo "$0: Notice: then if needed: make clobber all install" 1>&2 exit 5 fi -if [[ ! -f $JSTRENCODE_TOOL ]]; then - echo "$0: ERROR: jstrencode is not a file: $JSTRENCODE_TOOL" 1>&2 +if [[ ! -f $JSTRDECODE_TOOL ]]; then + echo "$0: ERROR: jstrdecode is not a file: $JSTRDECODE_TOOL" 1>&2 echo "$0: Notice: if needed: $GIT_TOOL clone $MKIOCCCENTRY_REPO; cd mkiocccentry" 1>&2 echo "$0: Notice: then if needed: make clobber all install" 1>&2 exit 5 fi -if [[ ! -x $JSTRENCODE_TOOL ]]; then - echo "$0: ERROR: cannot find an executable jstrencode tool: $JSTRENCODE_TOOL" 1>&2 +if [[ ! -x $JSTRDECODE_TOOL ]]; then + echo "$0: ERROR: cannot find an executable jstrdecode tool: $JSTRDECODE_TOOL" 1>&2 echo "$0: Notice: if needed: $GIT_TOOL clone $MKIOCCCENTRY_REPO; cd mkiocccentry" 1>&2 echo "$0: Notice: then if needed: make clobber all install" 1>&2 exit 5 diff --git a/bin/entry2csv.sh b/bin/entry2csv.sh index af754cff5..f917cab4a 100755 --- a/bin/entry2csv.sh +++ b/bin/entry2csv.sh @@ -146,21 +146,21 @@ if [[ -z $VERGE ]]; then exit 5 fi # -JSTRENCODE=$(type -P jstrencode) -export JSTRENCODE -if [[ -z $JSTRENCODE ]]; then - echo "$0: FATAL: jstrencode is not installed or not in \$PATH" 1>&2 - echo "$0: notice: to install jstrencode:" 1>&2 +JSTRDECODE=$(type -P jstrdecode) +export JSTRDECODE +if [[ -z $JSTRDECODE ]]; then + echo "$0: FATAL: jstrdecode is not installed or not in \$PATH" 1>&2 + echo "$0: notice: to install jstrdecode:" 1>&2 echo "$0: notice: run: git clone https://github.com/ioccc-src/mkiocccentry.git" 1>&2 echo "$0: notice: then: cd mkiocccentry && make clobber all" 1>&2 echo "$0: notice: then: cd jparse && sudo make install clobber" 1>&2 exit 5 fi -export MIN_JSTRENCODE_VERSION="2.0.0" -JSTRENCODE_VERSION=$("$JSTRENCODE" -V | head -1 | awk '{print $3;}') -if ! "$VERGE" "$JSTRENCODE_VERSION" "$MIN_JSTRENCODE_VERSION"; then - echo "$0: FATAL: jstrencode version: $JSTRENCODE_VERSION < minimum version: $MIN_JSTRENCODE_VERSION" 1>&2 - echo "$0: notice: consider updating jstrencode from mkiocccentry repo" 1>&2 +export MIN_JSTRDECODE_VERSION="2.0.2" +JSTRDECODE_VERSION=$("$JSTRDECODE" -V | head -1 | awk '{print $3;}') +if ! "$VERGE" "$JSTRDECODE_VERSION" "$MIN_JSTRDECODE_VERSION"; then + echo "$0: FATAL: jstrdecode version: $JSTRDECODE_VERSION < minimum version: $MIN_JSTRDECODE_VERSION" 1>&2 + echo "$0: notice: consider updating jstrdecode from mkiocccentry repo" 1>&2 echo "$0: notice: run: git clone https://github.com/ioccc-src/mkiocccentry.git" 1>&2 echo "$0: notice: then: cd mkiocccentry && make clobber all" 1>&2 echo "$0: notice: then: cd jparse && sudo make install clobber" 1>&2 @@ -378,13 +378,13 @@ function output_abstract # PATTERN='$..abstract' if [[ $V_FLAG -ge 5 ]]; then - echo "$0: debug[5]: about to run: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN' | $JSTRENCODE -N -" 1>&2 + echo "$0: debug[5]: about to run: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN' | $JSTRDECODE -N -" 1>&2 fi export ABSTRACT - ABSTRACT=$("$JVAL_WRAPPER" -b -q "$ENTRY_JSON_PATH" "$PATTERN" | "$JSTRENCODE" -N -) + ABSTRACT=$("$JVAL_WRAPPER" -b -q "$ENTRY_JSON_PATH" "$PATTERN" | "$JSTRDECODE" -N -) status_codes=("${PIPESTATUS[@]}") if [[ ${status_codes[*]} =~ [1-9] || -z $ABSTRACT ]]; then - echo "$0: ERROR: in output_abstract: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN' | $JSTRENCODE -N - failed," \ + echo "$0: ERROR: in output_abstract: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN' | $JSTRDECODE -N - failed," \ "error codes: ${status_codes[*]}" 1>&2 return 5 fi @@ -660,9 +660,9 @@ if [[ $V_FLAG -ge 3 ]]; then echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2 echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2 echo "$0: debug[3]: VERGE=$VERGE" 1>&2 - echo "$0: debug[3]: JSTRENCODE=$JSTRENCODE" 1>&2 - echo "$0: debug[3]: MIN_JSTRENCODE_VERSION=$MIN_JSTRENCODE_VERSION" 1>&2 - echo "$0: debug[3]: JSTRENCODE_VERSION=$JSTRENCODE_VERSION" 1>&2 + echo "$0: debug[3]: JSTRDECODE=$JSTRDECODE" 1>&2 + echo "$0: debug[3]: MIN_JSTRDECODE_VERSION=$MIN_JSTRDECODE_VERSION" 1>&2 + echo "$0: debug[3]: JSTRDECODE_VERSION=$JSTRDECODE_VERSION" 1>&2 echo "$0: debug[3]: NOOP=$NOOP" 1>&2 echo "$0: debug[3]: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2 echo "$0: debug[3]: EXIT_CODE=$EXIT_CODE" 1>&2 diff --git a/bin/gen-authors.sh b/bin/gen-authors.sh index 7d31e01c1..eae88afba 100755 --- a/bin/gen-authors.sh +++ b/bin/gen-authors.sh @@ -126,21 +126,21 @@ if [[ -z $VERGE ]]; then exit 5 fi # -JSTRENCODE=$(type -P jstrencode) -export JSTRENCODE -if [[ -z $JSTRENCODE ]]; then - echo "$0: FATAL: jstrencode is not installed or not in \$PATH" 1>&2 - echo "$0: notice: to install jstrencode:" 1>&2 +JSTRDECODE=$(type -P jstrdecode) +export JSTRDECODE +if [[ -z $JSTRDECODE ]]; then + echo "$0: FATAL: jstrdecode is not installed or not in \$PATH" 1>&2 + echo "$0: notice: to install jstrdecode:" 1>&2 echo "$0: notice: run: git clone https://github.com/ioccc-src/mkiocccentry.git" 1>&2 echo "$0: notice: then: cd mkiocccentry && make clobber all" 1>&2 echo "$0: notice: then: cd jparse && sudo make install clobber" 1>&2 exit 5 fi -export MIN_JSTRENCODE_VERSION="2.0.0" -JSTRENCODE_VERSION=$("$JSTRENCODE" -V | head -1 | awk '{print $3;}') -if ! "$VERGE" "$JSTRENCODE_VERSION" "$MIN_JSTRENCODE_VERSION"; then - echo "$0: FATAL: jstrencode version: $JSTRENCODE_VERSION < minimum version: $MIN_JSTRENCODE_VERSION" 1>&2 - echo "$0: notice: consider updating jstrencode from mkiocccentry repo" 1>&2 +export MIN_JSTRDECODE_VERSION="2.0.2" +JSTRDECODE_VERSION=$("$JSTRDECODE" -V | head -1 | awk '{print $3;}') +if ! "$VERGE" "$JSTRDECODE_VERSION" "$MIN_JSTRDECODE_VERSION"; then + echo "$0: FATAL: jstrdecode version: $JSTRDECODE_VERSION < minimum version: $MIN_JSTRDECODE_VERSION" 1>&2 + echo "$0: notice: consider updating jstrdecode from mkiocccentry repo" 1>&2 echo "$0: notice: run: git clone https://github.com/ioccc-src/mkiocccentry.git" 1>&2 echo "$0: notice: then: cd mkiocccentry && make clobber all" 1>&2 echo "$0: notice: then: cd jparse && sudo make install clobber" 1>&2 @@ -283,12 +283,12 @@ function output_award # PATTERN='$..award' if [[ $V_FLAG -ge 5 ]]; then - echo "$0: debug[5]: about to run: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN' | $JSTRENCODE -N -" 1>&2 + echo "$0: debug[5]: about to run: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN' | $JSTRDECODE -N -" 1>&2 fi - "$JVAL_WRAPPER" -b -q "$ENTRY_JSON_PATH" "$PATTERN" | "$JSTRENCODE" -N - + "$JVAL_WRAPPER" -b -q "$ENTRY_JSON_PATH" "$PATTERN" | "$JSTRDECODE" -N - status_codes=("${PIPESTATUS[@]}") if [[ ${status_codes[*]} =~ [1-9] ]]; then - echo "$0: ERROR: in output_award: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN' | $JSTRENCODE -N - failed," \ + echo "$0: ERROR: in output_award: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN' | $JSTRDECODE -N - failed," \ "error codes: ${status_codes[*]}" 1>&2 return 5 fi @@ -556,9 +556,9 @@ if [[ $V_FLAG -ge 3 ]]; then echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2 echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2 echo "$0: debug[3]: VERGE=$VERGE" 1>&2 - echo "$0: debug[3]: JSTRENCODE=$JSTRENCODE" 1>&2 - echo "$0: debug[3]: MIN_JSTRENCODE_VERSION=$MIN_JSTRENCODE_VERSION" 1>&2 - echo "$0: debug[3]: JSTRENCODE_VERSION=$JSTRENCODE_VERSION" 1>&2 + echo "$0: debug[3]: JSTRDECODE=$JSTRDECODE" 1>&2 + echo "$0: debug[3]: MIN_JSTRDECODE_VERSION=$MIN_JSTRDECODE_VERSION" 1>&2 + echo "$0: debug[3]: JSTRDECODE_VERSION=$JSTRDECODE_VERSION" 1>&2 echo "$0: debug[3]: DOCROOT_SLASH=$DOCROOT_SLASH" 1>&2 echo "$0: debug[3]: TAGLINE=$TAGLINE" 1>&2 echo "$0: debug[3]: MD2HTML_SH=$MD2HTML_SH" 1>&2 @@ -795,7 +795,7 @@ EOF # case "$NAME" in full_name) - FULL_NAME=$("$JSTRENCODE" "$VALUE") + FULL_NAME=$("$JSTRDECODE" "$VALUE") ;; location_code) LOCATION_CODE="$VALUE" @@ -816,7 +816,7 @@ EOF AUTHOR_GITHUB="$VALUE" ;; affiliation) - AUTHOR_AFFILIATION=$("$JSTRENCODE" "$VALUE") + AUTHOR_AFFILIATION=$("$JSTRDECODE" "$VALUE") ;; author_handle) AUTHOR_HANDLE="$VALUE" diff --git a/bin/gen-location.sh b/bin/gen-location.sh index 081e01324..9d6f05cb0 100755 --- a/bin/gen-location.sh +++ b/bin/gen-location.sh @@ -113,21 +113,21 @@ if [[ -z $VERGE ]]; then exit 5 fi # -JSTRENCODE=$(type -P jstrencode) -export JSTRENCODE -if [[ -z $JSTRENCODE ]]; then - echo "$0: FATAL: jstrencode is not installed or not in \$PATH" 1>&2 - echo "$0: notice: to install jstrencode:" 1>&2 +JSTRDECODE=$(type -P jstrdecode) +export JSTRDECODE +if [[ -z $JSTRDECODE ]]; then + echo "$0: FATAL: jstrdecode is not installed or not in \$PATH" 1>&2 + echo "$0: notice: to install jstrdecode:" 1>&2 echo "$0: notice: run: git clone https://github.com/ioccc-src/mkiocccentry.git" 1>&2 echo "$0: notice: then: cd mkiocccentry && make clobber all" 1>&2 echo "$0: notice: then: cd jparse && sudo make install clobber" 1>&2 exit 5 fi -export MIN_JSTRENCODE_VERSION="2.0.0" -JSTRENCODE_VERSION=$("$JSTRENCODE" -V | head -1 | awk '{print $3;}') -if ! "$VERGE" "$JSTRENCODE_VERSION" "$MIN_JSTRENCODE_VERSION"; then - echo "$0: FATAL: jstrencode version: $JSTRENCODE_VERSION < minimum version: $MIN_JSTRENCODE_VERSION" 1>&2 - echo "$0: notice: consider updating jstrencode from mkiocccentry repo" 1>&2 +export MIN_JSTRDECODE_VERSION="2.0.2" +JSTRDECODE_VERSION=$("$JSTRDECODE" -V | head -1 | awk '{print $3;}') +if ! "$VERGE" "$JSTRDECODE_VERSION" "$MIN_JSTRDECODE_VERSION"; then + echo "$0: FATAL: jstrdecode version: $JSTRDECODE_VERSION < minimum version: $MIN_JSTRDECODE_VERSION" 1>&2 + echo "$0: notice: consider updating jstrdecode from mkiocccentry repo" 1>&2 echo "$0: notice: run: git clone https://github.com/ioccc-src/mkiocccentry.git" 1>&2 echo "$0: notice: then: cd mkiocccentry && make clobber all" 1>&2 echo "$0: notice: then: cd jparse && sudo make install clobber" 1>&2 @@ -441,9 +441,9 @@ if [[ $V_FLAG -ge 3 ]]; then echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2 echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2 echo "$0: debug[3]: VERGE=$VERGE" 1>&2 - echo "$0: debug[3]: JSTRENCODE=$JSTRENCODE" 1>&2 - echo "$0: debug[3]: MIN_JSTRENCODE_VERSION=$MIN_JSTRENCODE_VERSION" 1>&2 - echo "$0: debug[3]: JSTRENCODE_VERSION=$JSTRENCODE_VERSION" 1>&2 + echo "$0: debug[3]: JSTRDECODE=$JSTRDECODE" 1>&2 + echo "$0: debug[3]: MIN_JSTRDECODE_VERSION=$MIN_JSTRDECODE_VERSION" 1>&2 + echo "$0: debug[3]: JSTRDECODE_VERSION=$JSTRDECODE_VERSION" 1>&2 echo "$0: debug[3]: DOCROOT_SLASH=$DOCROOT_SLASH" 1>&2 echo "$0: debug[3]: TAGLINE=$TAGLINE" 1>&2 echo "$0: debug[3]: MD2HTML_SH=$MD2HTML_SH" 1>&2 @@ -593,7 +593,7 @@ find "$AUTHOR_DIR" -mindepth 1 -maxdepth 1 -type f -name '*.json' -print | # obtain the author full name # PATTERN='$..full_name' - FULL_NAME=$("$JVAL_WRAPPER" -b -q "$AUTHOR_HANDLE_JSON" "$PATTERN" | "$JSTRENCODE" -N -) + FULL_NAME=$("$JVAL_WRAPPER" -b -q "$AUTHOR_HANDLE_JSON" "$PATTERN" | "$JSTRDECODE" -N -) status_codes=("${PIPESTATUS[@]}") if [[ ${status_codes[*]} =~ [1-9] || -z $FULL_NAME ]]; then echo "$0: ERROR: cannot full name from: $AUTHOR_HANDLE" 1>&2 diff --git a/bin/gen-years.sh b/bin/gen-years.sh index f4a9f52bd..e58d46e87 100755 --- a/bin/gen-years.sh +++ b/bin/gen-years.sh @@ -116,21 +116,21 @@ if [[ -z $VERGE ]]; then exit 5 fi # -JSTRENCODE=$(type -P jstrencode) -export JSTRENCODE -if [[ -z $JSTRENCODE ]]; then - echo "$0: FATAL: jstrencode is not installed or not in \$PATH" 1>&2 - echo "$0: notice: to install jstrencode:" 1>&2 +JSTRDECODE=$(type -P jstrdecode) +export JSTRDECODE +if [[ -z $JSTRDECODE ]]; then + echo "$0: FATAL: jstrdecode is not installed or not in \$PATH" 1>&2 + echo "$0: notice: to install jstrdecode:" 1>&2 echo "$0: notice: run: git clone https://github.com/ioccc-src/mkiocccentry.git" 1>&2 echo "$0: notice: then: cd mkiocccentry && make clobber all" 1>&2 echo "$0: notice: then: cd jparse && sudo make install clobber" 1>&2 exit 5 fi -export MIN_JSTRENCODE_VERSION="2.0.0" -JSTRENCODE_VERSION=$("$JSTRENCODE" -V | head -1 | awk '{print $3;}') -if ! "$VERGE" "$JSTRENCODE_VERSION" "$MIN_JSTRENCODE_VERSION"; then - echo "$0: FATAL: jstrencode version: $JSTRENCODE_VERSION < minimum version: $MIN_JSTRENCODE_VERSION" 1>&2 - echo "$0: notice: consider updating jstrencode from mkiocccentry repo" 1>&2 +export MIN_JSTRDECODE_VERSION="2.0.2" +JSTRDECODE_VERSION=$("$JSTRDECODE" -V | head -1 | awk '{print $3;}') +if ! "$VERGE" "$JSTRDECODE_VERSION" "$MIN_JSTRDECODE_VERSION"; then + echo "$0: FATAL: jstrdecode version: $JSTRDECODE_VERSION < minimum version: $MIN_JSTRDECODE_VERSION" 1>&2 + echo "$0: notice: consider updating jstrdecode from mkiocccentry repo" 1>&2 echo "$0: notice: run: git clone https://github.com/ioccc-src/mkiocccentry.git" 1>&2 echo "$0: notice: then: cd mkiocccentry && make clobber all" 1>&2 echo "$0: notice: then: cd jparse && sudo make install clobber" 1>&2 @@ -247,7 +247,7 @@ function output_award # obtain the award string # PATTERN='$..award' - AWARD_STRING=$("$JVAL_WRAPPER" -b -q "$ENTRY_JSON_PATH" "$PATTERN" | "$JSTRENCODE" -N -) + AWARD_STRING=$("$JVAL_WRAPPER" -b -q "$ENTRY_JSON_PATH" "$PATTERN" | "$JSTRDECODE" -N -) status_codes=("${PIPESTATUS[@]}") if [[ ${status_codes[*]} =~ [1-9] || -z $AWARD_STRING ]]; then echo "$0: ERROR: in output_award: no award found in .entry.json file: $ENTRY_JSON_PATH" 1>&2 @@ -596,9 +596,9 @@ if [[ $V_FLAG -ge 3 ]]; then echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2 echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2 echo "$0: debug[3]: VERGE=$VERGE" 1>&2 - echo "$0: debug[3]: JSTRENCODE=$JSTRENCODE" 1>&2 - echo "$0: debug[3]: MIN_JSTRENCODE_VERSION=$MIN_JSTRENCODE_VERSION" 1>&2 - echo "$0: debug[3]: JSTRENCODE_VERSION=$JSTRENCODE_VERSION" 1>&2 + echo "$0: debug[3]: JSTRDECODE=$JSTRDECODE" 1>&2 + echo "$0: debug[3]: MIN_JSTRDECODE_VERSION=$MIN_JSTRDECODE_VERSION" 1>&2 + echo "$0: debug[3]: JSTRDECODE_VERSION=$JSTRDECODE_VERSION" 1>&2 echo "$0: debug[3]: TAC_TOOL=$TAC_TOOL" 1>&2 echo "$0: debug[3]: FMT_TOOL=$FMT_TOOL" 1>&2 echo "$0: debug[3]: DOCROOT_SLASH=$DOCROOT_SLASH" 1>&2 diff --git a/bin/index.html b/bin/index.html index 2face125f..2306ed2fe 100644 --- a/bin/index.html +++ b/bin/index.html @@ -896,8 +896,8 @@ or if not found, the JSONPath.sh(1) tool from the recently forked a 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' | jstrencode - -

NOTE: With jstrencode(1) version 1.2.3 or better, one can use jstrencode -N + bin/jval-wrapper.sh -q -T author/Anton_Algmyr.json '$.full_name' | jstrdecode - +

NOTE: With jstrdecode(1) version 1.2.3 or better, one can use jstrdecode -N and not have to use -T with bin/jval-wrapper.sh.

manifest.csv.entry.awk

diff --git a/bin/manifest.entry.json.awk b/bin/manifest.entry.json.awk index bd8c77550..49c39e912 100755 --- a/bin/manifest.entry.json.awk +++ b/bin/manifest.entry.json.awk @@ -302,17 +302,17 @@ within_manifest_array == 1 && begin_manifest_element == 1 && NF >= 3 && $1 ~ /^" # so we can single quote the entry_text as a single string, we protect any single quotes within it # - jstrencode_arg = entry_text; - gsub(/'/, "'\"'\"'", jstrencode_arg); + jstrdecode_arg = entry_text; + gsub(/'/, "'\"'\"'", jstrdecode_arg); - # form the jstrencode command + # form the jstrdecode command # - if (jstrencode_arg ~ /^".*"$/) { - jstrencode_cmd = "jstrencode -Q -- " "'" substr(jstrencode_arg, 2, length(jstrencode_arg)-2) "'"; + if (jstrdecode_arg ~ /^".*"$/) { + jstrdecode_cmd = "jstrdecode -Q -- " "'" substr(jstrdecode_arg, 2, length(jstrdecode_arg)-2) "'"; } else { - jstrencode_cmd = "jstrencode -Q -- " "'" jstrencode_arg "'"; + jstrdecode_cmd = "jstrdecode -Q -- " "'" jstrdecode_arg "'"; } - jstrencode_cmd = jstrencode_cmd " 2>/dev/null; echo $?"; + jstrdecode_cmd = jstrdecode_cmd " 2>/dev/null; echo $?"; # JSON decode entry_text # @@ -320,21 +320,21 @@ within_manifest_array == 1 && begin_manifest_element == 1 && NF >= 3 && $1 ~ /^" result = ""; exit_code = 0; # process each pipe line - while ((jstrencode_cmd | getline pipe_output) > 0) { + while ((jstrdecode_cmd | getline pipe_output) > 0) { if (numLines++ == 0) { - # case: 1st line is from jstrencode + # case: 1st line is from jstrdecode result = pipe_output; } else { - # case: 2nd/line line is the jstrencode exit code + # case: 2nd/line line is the jstrdecode exit code exit_code = pipe_output; } } - close(jstrencode_cmd); + close(jstrdecode_cmd); - # validate exit code from jstrencode + # validate exit code from jstrdecode # if (length(exit_code) == 0 || exit_code != 0) { - print "ERROR: unable to jstrencode entry_text:", entry_text > "/dev/stderr"; + print "ERROR: unable to jstrdecode entry_text:", entry_text > "/dev/stderr"; exit 213; # END section will output ERROR message about cannot JSON decode entry_text } diff --git a/bin/output-index-author.sh b/bin/output-index-author.sh index acd3601ff..00dda54fc 100755 --- a/bin/output-index-author.sh +++ b/bin/output-index-author.sh @@ -132,21 +132,21 @@ if [[ -z $VERGE ]]; then exit 5 fi # -JSTRENCODE=$(type -P jstrencode) -export JSTRENCODE -if [[ -z $JSTRENCODE ]]; then - echo "$0: FATAL: jstrencode is not installed or not in \$PATH" 1>&2 - echo "$0: notice: to install jstrencode:" 1>&2 +JSTRDECODE=$(type -P jstrdecode) +export JSTRDECODE +if [[ -z $JSTRDECODE ]]; then + echo "$0: FATAL: jstrdecode is not installed or not in \$PATH" 1>&2 + echo "$0: notice: to install jstrdecode:" 1>&2 echo "$0: notice: run: git clone https://github.com/ioccc-src/mkiocccentry.git" 1>&2 echo "$0: notice: then: cd mkiocccentry && make clobber all" 1>&2 echo "$0: notice: then: cd jparse && sudo make install clobber" 1>&2 exit 5 fi -export MIN_JSTRENCODE_VERSION="2.0.0" -JSTRENCODE_VERSION=$("$JSTRENCODE" -V | head -1 | awk '{print $3;}') -if ! "$VERGE" "$JSTRENCODE_VERSION" "$MIN_JSTRENCODE_VERSION"; then - echo "$0: FATAL: jstrencode version: $JSTRENCODE_VERSION < minimum version: $MIN_JSTRENCODE_VERSION" 1>&2 - echo "$0: notice: consider updating jstrencode from mkiocccentry repo" 1>&2 +export MIN_JSTRDECODE_VERSION="2.0.2" +JSTRDECODE_VERSION=$("$JSTRDECODE" -V | head -1 | awk '{print $3;}') +if ! "$VERGE" "$JSTRDECODE_VERSION" "$MIN_JSTRDECODE_VERSION"; then + echo "$0: FATAL: jstrdecode version: $JSTRDECODE_VERSION < minimum version: $MIN_JSTRDECODE_VERSION" 1>&2 + echo "$0: notice: consider updating jstrdecode from mkiocccentry repo" 1>&2 echo "$0: notice: run: git clone https://github.com/ioccc-src/mkiocccentry.git" 1>&2 echo "$0: notice: then: cd mkiocccentry && make clobber all" 1>&2 echo "$0: notice: then: cd jparse && sudo make install clobber" 1>&2 @@ -345,10 +345,10 @@ function output_full_name # extract Full Name from the author/author_handle.json file # PATTERN='$..full_name' - "$JVAL_WRAPPER" -b -q "$AUTHOR_HANDLE_JSON_PATH" "$PATTERN" | "$JSTRENCODE" -N - + "$JVAL_WRAPPER" -b -q "$AUTHOR_HANDLE_JSON_PATH" "$PATTERN" | "$JSTRDECODE" -N - status_codes=("${PIPESTATUS[@]}") if [[ ${status_codes[*]} =~ [1-9] ]]; then - echo "$0: ERROR: in output_full_name: $JVAL_WRAPPER -b -q $AUTHOR_HANDLE_JSON_PATH '$PATTERN' | $JSTRENCODE -N - failed," \ + echo "$0: ERROR: in output_full_name: $JVAL_WRAPPER -b -q $AUTHOR_HANDLE_JSON_PATH '$PATTERN' | $JSTRDECODE -N - failed," \ "error codes: ${status_codes[*]}" 1>&2 return 5 fi @@ -688,9 +688,9 @@ if [[ $V_FLAG -ge 3 ]]; then echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2 echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2 echo "$0: debug[3]: VERGE=$VERGE" 1>&2 - echo "$0: debug[3]: JSTRENCODE=$JSTRENCODE" 1>&2 - echo "$0: debug[3]: MIN_JSTRENCODE_VERSION=$MIN_JSTRENCODE_VERSION" 1>&2 - echo "$0: debug[3]: JSTRENCODE_VERSION=$JSTRENCODE_VERSION" 1>&2 + echo "$0: debug[3]: JSTRDECODE=$JSTRDECODE" 1>&2 + echo "$0: debug[3]: MIN_JSTRDECODE_VERSION=$MIN_JSTRDECODE_VERSION" 1>&2 + echo "$0: debug[3]: JSTRDECODE_VERSION=$JSTRDECODE_VERSION" 1>&2 echo "$0: debug[3]: DOCROOT_SLASH=$DOCROOT_SLASH" 1>&2 echo "$0: debug[3]: REPO_TOP_URL=$REPO_TOP_URL" 1>&2 echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2 diff --git a/bin/output-year-index.sh b/bin/output-year-index.sh index a6a79bb7e..833d936c4 100755 --- a/bin/output-year-index.sh +++ b/bin/output-year-index.sh @@ -151,21 +151,21 @@ if [[ -z $VERGE ]]; then exit 5 fi # -JSTRENCODE=$(type -P jstrencode) -export JSTRENCODE -if [[ -z $JSTRENCODE ]]; then - echo "$0: FATAL: jstrencode is not installed or not in \$PATH" 1>&2 - echo "$0: notice: to install jstrencode:" 1>&2 +JSTRDECODE=$(type -P jstrdecode) +export JSTRDECODE +if [[ -z $JSTRDECODE ]]; then + echo "$0: FATAL: jstrdecode is not installed or not in \$PATH" 1>&2 + echo "$0: notice: to install jstrdecode:" 1>&2 echo "$0: notice: run: git clone https://github.com/ioccc-src/mkiocccentry.git" 1>&2 echo "$0: notice: then: cd mkiocccentry && make clobber all" 1>&2 echo "$0: notice: then: cd jparse && sudo make install clobber" 1>&2 exit 5 fi -export MIN_JSTRENCODE_VERSION="2.0.0" -JSTRENCODE_VERSION=$("$JSTRENCODE" -V | head -1 | awk '{print $3;}') -if ! "$VERGE" "$JSTRENCODE_VERSION" "$MIN_JSTRENCODE_VERSION"; then - echo "$0: FATAL: jstrencode version: $JSTRENCODE_VERSION < minimum version: $MIN_JSTRENCODE_VERSION" 1>&2 - echo "$0: notice: consider updating jstrencode from mkiocccentry repo" 1>&2 +export MIN_JSTRDECODE_VERSION="2.0.2" +JSTRDECODE_VERSION=$("$JSTRDECODE" -V | head -1 | awk '{print $3;}') +if ! "$VERGE" "$JSTRDECODE_VERSION" "$MIN_JSTRDECODE_VERSION"; then + echo "$0: FATAL: jstrdecode version: $JSTRDECODE_VERSION < minimum version: $MIN_JSTRDECODE_VERSION" 1>&2 + echo "$0: notice: consider updating jstrdecode from mkiocccentry repo" 1>&2 echo "$0: notice: run: git clone https://github.com/ioccc-src/mkiocccentry.git" 1>&2 echo "$0: notice: then: cd mkiocccentry && make clobber all" 1>&2 echo "$0: notice: then: cd jparse && sudo make install clobber" 1>&2 @@ -259,12 +259,12 @@ function output_award # PATTERN='$..award' if [[ $V_FLAG -ge 5 ]]; then - echo "$0: debug[5]: about to run: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN' | $JSTRENCODE -N -" 1>&2 + echo "$0: debug[5]: about to run: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN' | $JSTRDECODE -N -" 1>&2 fi - "$JVAL_WRAPPER" -b -q "$ENTRY_JSON_PATH" "$PATTERN" | "$JSTRENCODE" -N - + "$JVAL_WRAPPER" -b -q "$ENTRY_JSON_PATH" "$PATTERN" | "$JSTRDECODE" -N - status_codes=("${PIPESTATUS[@]}") if [[ ${status_codes[*]} =~ [1-9] ]]; then - echo "$0: ERROR: in output_award: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN' | $JSTRENCODE -N - failed," \ + echo "$0: ERROR: in output_award: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN' | $JSTRDECODE -N - failed," \ "error codes: ${status_codes[*]}" 1>&2 return 5 fi @@ -586,9 +586,9 @@ if [[ $V_FLAG -ge 3 ]]; then echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2 echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2 echo "$0: debug[3]: VERGE=$VERGE" 1>&2 - echo "$0: debug[3]: JSTRENCODE=$JSTRENCODE" 1>&2 - echo "$0: debug[3]: MIN_JSTRENCODE_VERSION=$MIN_JSTRENCODE_VERSION" 1>&2 - echo "$0: debug[3]: JSTRENCODE_VERSION=$JSTRENCODE_VERSION" 1>&2 + echo "$0: debug[3]: JSTRDECODE=$JSTRDECODE" 1>&2 + echo "$0: debug[3]: MIN_JSTRDECODE_VERSION=$MIN_JSTRDECODE_VERSION" 1>&2 + echo "$0: debug[3]: JSTRDECODE_VERSION=$JSTRDECODE_VERSION" 1>&2 echo "$0: debug[3]: DOCROOT_SLASH=$DOCROOT_SLASH" 1>&2 echo "$0: debug[3]: REPO_TOP_URL=$REPO_TOP_URL" 1>&2 echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2 diff --git a/bin/subst.default.sh b/bin/subst.default.sh index 972982237..0de81b3e9 100755 --- a/bin/subst.default.sh +++ b/bin/subst.default.sh @@ -290,7 +290,7 @@ echo "DOCROOT_SLASH=$DOCROOT_SLASH" export VALIDATOR_ENCODED_URL -# output the Validator encoded URL +# output the Validator decoded URL # echo "-s" echo "VALIDATOR_ENCODED_URL=$VALIDATOR_ENCODED_URL" diff --git a/bin/subst.entry-index.sh b/bin/subst.entry-index.sh index 9b5e8d32c..35b4e2027 100755 --- a/bin/subst.entry-index.sh +++ b/bin/subst.entry-index.sh @@ -146,21 +146,21 @@ if [[ -z $VERGE ]]; then exit 5 fi # -JSTRENCODE=$(type -P jstrencode) -export JSTRENCODE -if [[ -z $JSTRENCODE ]]; then - echo "$0: FATAL: jstrencode is not installed or not in \$PATH" 1>&2 - echo "$0: notice: to install jstrencode:" 1>&2 +JSTRDECODE=$(type -P jstrdecode) +export JSTRDECODE +if [[ -z $JSTRDECODE ]]; then + echo "$0: FATAL: jstrdecode is not installed or not in \$PATH" 1>&2 + echo "$0: notice: to install jstrdecode:" 1>&2 echo "$0: notice: run: git clone https://github.com/ioccc-src/mkiocccentry.git" 1>&2 echo "$0: notice: then: cd mkiocccentry && make clobber all" 1>&2 echo "$0: notice: then: cd jparse && sudo make install clobber" 1>&2 exit 5 fi -export MIN_JSTRENCODE_VERSION="2.0.0" -JSTRENCODE_VERSION=$("$JSTRENCODE" -V | head -1 | awk '{print $3;}') -if ! "$VERGE" "$JSTRENCODE_VERSION" "$MIN_JSTRENCODE_VERSION"; then - echo "$0: FATAL: jstrencode version: $JSTRENCODE_VERSION < minimum version: $MIN_JSTRENCODE_VERSION" 1>&2 - echo "$0: notice: consider updating jstrencode from mkiocccentry repo" 1>&2 +export MIN_JSTRDECODE_VERSION="2.0.2" +JSTRDECODE_VERSION=$("$JSTRDECODE" -V | head -1 | awk '{print $3;}') +if ! "$VERGE" "$JSTRDECODE_VERSION" "$MIN_JSTRDECODE_VERSION"; then + echo "$0: FATAL: jstrdecode version: $JSTRDECODE_VERSION < minimum version: $MIN_JSTRDECODE_VERSION" 1>&2 + echo "$0: notice: consider updating jstrdecode from mkiocccentry repo" 1>&2 echo "$0: notice: run: git clone https://github.com/ioccc-src/mkiocccentry.git" 1>&2 echo "$0: notice: then: cd mkiocccentry && make clobber all" 1>&2 echo "$0: notice: then: cd jparse && sudo make install clobber" 1>&2 @@ -254,12 +254,12 @@ function output_award # PATTERN='$..award' if [[ $V_FLAG -ge 5 ]]; then - echo "$0: debug[5]: about to run: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN' | $JSTRENCODE -N - | sed -f $HTML_SED" 1>&2 + echo "$0: debug[5]: about to run: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN' | $JSTRDECODE -N - | sed -f $HTML_SED" 1>&2 fi - "$JVAL_WRAPPER" -b -q "$ENTRY_JSON_PATH" "$PATTERN" | "$JSTRENCODE" -N - | sed -f "$HTML_SED" + "$JVAL_WRAPPER" -b -q "$ENTRY_JSON_PATH" "$PATTERN" | "$JSTRDECODE" -N - | sed -f "$HTML_SED" status_codes=("${PIPESTATUS[@]}") if [[ ${status_codes[*]} =~ [1-9] ]]; then - echo "$0: ERROR: in output_award: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN' | $JSTRENCODE -N - | sed -f $HTML_SED failed," \ + echo "$0: ERROR: in output_award: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN' | $JSTRDECODE -N - | sed -f $HTML_SED failed," \ "error codes: ${status_codes[*]}" 1>&2 return 5 fi @@ -305,12 +305,12 @@ function output_abstract # PATTERN='$..abstract' if [[ $V_FLAG -ge 5 ]]; then - echo "$0: debug[5]: about to run: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN' | $JSTRENCODE -N - | sed -f $HTML_SED" 1>&2 + echo "$0: debug[5]: about to run: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN' | $JSTRDECODE -N - | sed -f $HTML_SED" 1>&2 fi - "$JVAL_WRAPPER" -b -q "$ENTRY_JSON_PATH" "$PATTERN" | "$JSTRENCODE" -N - | sed -f "$HTML_SED" + "$JVAL_WRAPPER" -b -q "$ENTRY_JSON_PATH" "$PATTERN" | "$JSTRDECODE" -N - | sed -f "$HTML_SED" status_codes=("${PIPESTATUS[@]}") if [[ ${status_codes[*]} =~ [1-9] ]]; then - echo "$0: ERROR: in output_abstract: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN | $JSTRENCODE -N - | sed -f $HTML_SED failed," \ + echo "$0: ERROR: in output_abstract: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN | $JSTRDECODE -N - | sed -f $HTML_SED failed," \ "error codes: ${status_codes[*]}" 1>&2 return 5 fi @@ -628,9 +628,9 @@ if [[ $V_FLAG -ge 3 ]]; then echo "$0: debug[3]: GIT_TOOL=$GIT_TOOL" 1>&2 echo "$0: debug[3]: TOPDIR=$TOPDIR" 1>&2 echo "$0: debug[3]: VERGE=$VERGE" 1>&2 - echo "$0: debug[3]: JSTRENCODE=$JSTRENCODE" 1>&2 - echo "$0: debug[3]: MIN_JSTRENCODE_VERSION=$MIN_JSTRENCODE_VERSION" 1>&2 - echo "$0: debug[3]: JSTRENCODE_VERSION=$JSTRENCODE_VERSION" 1>&2 + echo "$0: debug[3]: JSTRDECODE=$JSTRDECODE" 1>&2 + echo "$0: debug[3]: MIN_JSTRDECODE_VERSION=$MIN_JSTRDECODE_VERSION" 1>&2 + echo "$0: debug[3]: JSTRDECODE_VERSION=$JSTRDECODE_VERSION" 1>&2 echo "$0: debug[3]: DOCROOT_SLASH=$DOCROOT_SLASH" 1>&2 echo "$0: debug[3]: REPO_TOP_URL=$REPO_TOP_URL" 1>&2 echo "$0: debug[3]: REPO_URL=$REPO_URL" 1>&2