add HTML phase 20-22 to readme2index.sh, improve inc/gen-author.sh,

Add code to `readme2index.sh` to implement HTML phases 20, 21 and 22.

Improve `inc/gen-author.sh` to put blank lines around
the pandoc tool output.

Changed `inc/gen-author.sh` VERSION from "1.1 2024-01-01"
to "1.2 2024-01-04".
This commit is contained in:
Landon Curt Noll committed 2024-01-04 21:36:22 -08:00
1 parent d990a4bdf9
commit cb98c2a3a0
2 files changed
+113 -19

No files matched your search

+6 -14
View File
@@ -56,7 +56,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.1 2024-01-01"
export VERSION="1.2 2024-01-04"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -665,7 +665,6 @@ fi
# write author header to temporary markdown file
#
{
echo "<!-- START: this line starts content generated by: inc/$NAME -->"
AUTHOR_COUNT=$(echo "$AUTHOR_HANDLE_SET" | wc -l)
if [[ $AUTHOR_COUNT -gt 1 ]]; then
echo '<a name="author">**Authors:**</a>'
@@ -714,6 +713,7 @@ for author_handle in $AUTHOR_HANDLE_SET; do
if [[ $LOCATION_CODE == null ]]; then
echo "Location: [unknown](/location.html#$LOCATION_CODE)"
else
echo "Location: [$LOCATION_CODE](/location.html#$LOCATION_CODE)"
fi
echo
@@ -726,21 +726,11 @@ for author_handle in $AUTHOR_HANDLE_SET; do
fi
done
# write END line
#
{
echo "<!-- END: next line ends content generated by: inc/$NAME -->"
} | if [[ -z $NOOP ]]; then
cat >> "$TMP_FILE"
elif [[ $V_FLAG -ge 3 ]]; then
sed -e "s;^;$0: debug[3]: -n disabled write: ;" 1>&2
else
cat >> /dev/null
fi
# convert temporary markdown file into HTML
#
if [[ -z $NOOP ]]; then
echo "<!-- START: this line starts content generated by: inc/$NAME -->"
echo
if [[ $V_FLAG -ge 1 ]]; then
echo "$0: debug[1]: about to execute: $PANDOC_WRAPPER -P \"$PANDOC_WRAPPER_OPTSTR\" $TMP_FILE -" 1>&2
fi
@@ -750,6 +740,8 @@ if [[ -z $NOOP ]]; then
echo "$0: ERROR: pandoc failed, error: $status" 1>&2
exit 218
fi
echo
echo "<!-- END: next line ends content generated by: inc/$NAME -->"
elif [[ $V_FLAG -ge 1 ]]; then
echo "$0: debug[1]: -n disabled execution of: $PANDOC_WRAPPER -P \"$PANDOC_WRAPPER_OPTSTR\" $TMP_FILE -" 1>&2
fi