add title and abstract to .entry.json and index.html files

We add an initial "_title_" and "_abstract_" to all entry `.entry.json` files.

The `bin/csv2entry.sh` tool reads the `summary.csv` file and
loads the "_title_" and "_abstract_" to entry `.entry.json` files.

Changed `bin/csv2entry.sh` VERSION from "1.3 2024-09-23"
to "1.4 2024-09-27".

Perform `make csv2entry` to perform the above and test under macOS.

The `bin/cvt-submission.sh` tool adds "_title_" and "_abstract_" to the
.entry.json based on the `.info.json` file.

Changed `bin/cvt-submission.sh` VERSION from "1.2 2024-09-23"
to "1.3 2024-09-27".

The `bin/entry2csv.sh` tool forms the `summary.csv` file
based on the "_title_" and "_abstract_" fields found in .entry.json files.

Changed `bin/entry2csv.sh` VERSION from "1.3 2024-09-23"
to "1.4 2024-09-27".

Perform `make entry2csv` to perform the above and test under macOS.

Added `-H` and `header=with-header-3` to the `bin/md2html.cfg`
for the configuration entry for `[12][0-9][0-9][0-9]/*/README.md`.

Changed `bin/md2html.sh` VERSION from "1.6 2024-08-17"
to "1.7 2024-09-27".

All entry `index.html` files now list the "_abstract_" in a new
`<h3>abstract</h3>` header.

Changed `bin/subst.entry-index.sh` VERSION from "1.6 2024-09-23"
to "1.7 2024-09-27".

Removed `summary.csv`.

Added `summary.csv` and `summary.numbers` to `.gitignore`.
Sorted the result with `bin/sgi.sh`.

Perform `make quick_www` to perform the above and test under macOS.

Perform `make www` to perform the above and test under macOS.
This commit is contained in:
Landon Curt Noll committed 2024-09-27 23:40:45 -07:00
1 parent 16c5a84b10
commit 0fa01fd744
651 files changed
+1925 -743

No files matched your search

+70 -1
View File
@@ -106,7 +106,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.6 2024-09-23"
export VERSION="1.7 2024-09-27"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -220,6 +220,58 @@ function output_award
}
# Write the abstract name to standard output (stdout)
#
# usage:
# output_abstract YYYY/dir/.entry.json
#
# returns:
# 0 ==> no errors detected, but output may be empty
# > 0 ==> function error number
#
function output_abstract
{
local ENTRY_JSON_PATH; # the .entry.json path
local PATTERN; # XPath for JSON pattern
# parse args
#
if [[ $# -ne 1 ]]; then
echo "$0: ERROR: in output_abstract: expected 1 arg, found $#" 1>&2
return 1
fi
ENTRY_JSON_PATH="$1"
if [[ ! -e $ENTRY_JSON_PATH ]]; then
echo "$0: ERROR: in output_abstract: .entry.json does not exist: $ENTRY_JSON_PATH" 1>&2
return 2
fi
if [[ ! -f $ENTRY_JSON_PATH ]]; then
echo "$0: ERROR: in output_abstract: .entry.json is not a file: $ENTRY_JSON_PATH" 1>&2
return 3
fi
if [[ ! -r $ENTRY_JSON_PATH ]]; then
echo "$0: ERROR: in output_abstract: .entry.json is not a readable file: $ENTRY_JSON_PATH" 1>&2
return 4
fi
# obtain the abstract string
#
PATTERN='$..abstract'
if [[ $V_FLAG -ge 5 ]]; then
echo "$0: debug[5]: about to run: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN' | sed ..." 1>&2
fi
"$JVAL_WRAPPER" -b -q "$ENTRY_JSON_PATH" "$PATTERN" | sed -f "$UNICODE_FIX_SED"
status="$?"
status_codes=("${PIPESTATUS[@]}")
if [[ ${status_codes[*]} =~ [1-9] ]]; then
echo "$0: ERROR: in output_abstract: $JVAL_WRAPPER -b -q -- $ENTRY_JSON_PATH '$PATTERN | sed ... failed," \
"error codes: ${status_codes[*]}" 1>&2
return 5
fi
return 0
}
# setup
#
export NOOP=
@@ -511,6 +563,16 @@ if [[ -z $AWARD ]]; then
fi
# determine abstract
#
ABSTRACT=$(output_abstract "$ENTRY_JSON")
export ABSTRACT
if [[ -z $ABSTRACT ]]; then
echo "$0: ERROR: cannot determine abstract for $YEAR_DIR from: $ENTRY_JSON" 1>&2
exit 1
fi
# parameter debugging
#
if [[ $V_FLAG -ge 3 ]]; then
@@ -546,6 +608,7 @@ if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: DOT_PATH_CONTENT=$DOT_PATH_CONTENT" 1>&2
echo "$0: debug[3]: ENTRY_NAVBAR_AWK=$ENTRY_NAVBAR_AWK" 1>&2
echo "$0: debug[3]: AWARD=$AWARD" 1>&2
echo "$0: debug[3]: ABSTRACT=$ABSTRACT" 1>&2
fi
@@ -583,6 +646,12 @@ echo "-s"
echo "HEADER_2=$YYYY_DIR - $AWARD"
# output HEADER_3 substitution
#
echo "-s"
echo "HEADER_3=$ABSTRACT"
# output navbar left hand side links
#
awk -v entry_path="$YYYY_DIR" -f "$ENTRY_NAVBAR_AWK" "$DOT_ALLYEAR"