Added comments about where markdown content came from

The HTML files now include a comment indicating from where the main
part of the markdown content.

Changed `bin/gen-other-html.sh` VERSION from "1.0 2024-02-27"
to "1.0.1 2024-03-08".

Changed `bin/gen-top-html.sh` VERSION from "1.2 2024-02-29"
to "1.2.1 2024-03-08".

Changed `bin/gen-year-index.sh` VERSION from "1.0.1 2024-02-23"
to "1.0.2 2024-03-08".

Changed `bin/md2html.sh` VERSION from "1.0.1 2024-02-23"
to "1.1 2024-03-08".

Changed `bin/quick-readme2index.sh` VERSION from "1.1.1 2024-02-23"
to "1.1.2 2024-03-08".
This commit is contained in:
Landon Curt Noll committed 2024-03-08 22:32:03 -08:00
1 parent adaea3becc
commit 085a708660
402 files changed
+1070 -630

No files matched your search

+9 -5
View File
@@ -49,7 +49,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.0 2024-02-27"
export VERSION="1.0.1 2024-03-08"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -595,16 +595,19 @@ for YYYY in $(< "$TOP_FILE"); do
if [[ $V_FLAG -ge 5 ]]; then
echo "$0: debug[5]: about to run: $MD2HTML_SH ${TOOL_OPTION[*]}" \
"-s $DESCRIPTION -s $KEYWORDS -s $HEADER_2" \
"-s $UP_LINK -s $UP_TEXT -D $D_OPTION -v $V_FLAG -- $MD_FILE $HTML_FLLE" 1>&2
"-s $UP_LINK -s $UP_TEXT -D $D_OPTION -m $MD_FILE -v $V_FLAG --" \
"$MD_FILE $HTML_FLLE" 1>&2
fi
"$MD2HTML_SH" "${TOOL_OPTION[@]}" \
-s "$DESCRIPTION" -s "$KEYWORDS" -s "$HEADER_2" \
-s "$UP_LINK" -s "$UP_TEXT" -D "$D_OPTION" -v "$V_FLAG" -- "$MD_FILE" "$HTML_FLLE"
-s "$UP_LINK" -s "$UP_TEXT" -D "$D_OPTION" -m "$MD_FILE" -v "$V_FLAG" -- \
"$MD_FILE" "$HTML_FLLE"
status="$?"
if [[ $status -ne 0 ]]; then
echo "$0: ERROR: tool: $MD2HTML_SH ${TOOL_OPTION[*]}" \
"-s $DESCRIPTION -s $KEYWORDS -s $HEADER_2" \
"-s $UP_LINK -s $UP_TEXT -D $D_OPTION -v $V_FLAG -- $MD_FILE $HTML_FLLE failed, error: $status" 1>&2
"-s $UP_LINK -s $UP_TEXT -D $D_OPTION -m $MD_FILE -v $V_FLAG --" \
"$MD_FILE $HTML_FLLE failed, error: $status" 1>&2
echo 1 > "$TMP_EXIT_CODE" # exit 1
echo "$0: Warning: EXIT_CODE set to: $EXIT_CODE" 1>&2
continue
@@ -615,7 +618,8 @@ for YYYY in $(< "$TOP_FILE"); do
elif [[ $V_FLAG -ge 5 ]]; then
echo "$0: debug[5]: because of -n, did not run: $MD2HTML_SH ${TOOL_OPTION[*]}" \
"-s $DESCRIPTION -s $KEYWORDS -s $HEADER_2" \
"-s $UP_LINK -s $UP_TEXT -D $D_OPTION -v $V_FLAG -- $MD_FILE $HTML_FLLE" 1>&2
"-s $UP_LINK -s $UP_TEXT -D $D_OPTION -m $MD_FILE -v $V_FLAG --" \
"$MD_FILE $HTML_FLLE" 1>&2
fi
done
done
+9 -5
View File
@@ -54,7 +54,7 @@ TOP_MD_SET+=("faq")
# set variables referenced in the usage message
#
export VERSION="1.2 2024-02-29"
export VERSION="1.2.1 2024-03-08"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -457,12 +457,15 @@ for name in "${TOP_MD_SET[@]}"; do
#
if [[ -z $NOOP ]]; then
if [[ $V_FLAG -ge 1 ]]; then
echo "$0: debug[1]: about to run: $MD2HTML_SH ${TOOL_OPTION[*]} -- $MD_FILE $HTML_FILE" 1>&2
echo "$0: debug[1]: about to run: $MD2HTML_SH ${TOOL_OPTION[*]} -m $MD_FILE --" \
"$MD_FILE $HTML_FILE" 1>&2
fi
"$MD2HTML_SH" "${TOOL_OPTION[@]}" -- "$MD_FILE" "$HTML_FILE"
"$MD2HTML_SH" "${TOOL_OPTION[@]}" -m "$MD_FILE" -- \
"$MD_FILE" "$HTML_FILE"
status="$?"
if [[ $status -ne 0 ]]; then
echo "$0: Warning: md2html.sh: $MD2HTML_SH ${TOOL_OPTION[*]} -- $MD_FILE $HTML_FILE" \
echo "$0: Warning: md2html.sh: $MD2HTML_SH ${TOOL_OPTION[*]} -m $MD_FILE --" \
"$MD_FILE $HTML_FILE" \
"failed, error: $status" 1>&2
EXIT_CODE="1" # exit 1
echo "$0: Warning: EXIT_CODE set to: $EXIT_CODE" 1>&2
@@ -473,7 +476,8 @@ for name in "${TOP_MD_SET[@]}"; do
# report disabled by -n
#
elif [[ $V_FLAG -ge 5 ]]; then
echo "$0: debug[5]: because of -n, did not run: $MD2HTML_SH ${TOOL_OPTION[*]} -- $MD_FILE $HTML_FILE" 1>&2
echo "$0: debug[5]: because of -n, did not run: $MD2HTML_SH ${TOOL_OPTION[*]} -m $MD_FILE --" \
"$MD_FILE $HTML_FILE" 1>&2
fi
done
+9 -5
View File
@@ -51,7 +51,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.0.1 2024-02-23"
export VERSION="1.0.2 2024-03-08"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -383,19 +383,23 @@ fi
if [[ -z $NOOP ]]; then
if [[ $V_FLAG -ge 1 ]]; then
echo "$0: debug[1]: about to run: $MD2HTML_SH ${TOOL_OPTION[*]} -- $YYYY/README.md $YYYY/index.html" 1>&2
echo "$0: debug[1]: about to run: $MD2HTML_SH ${TOOL_OPTION[*]} -m $YYYY/README.md --" \
"$YYYY/README.md $YYYY/index.html" 1>&2
fi
"$MD2HTML_SH" "${TOOL_OPTION[@]}" -- "$YYYY/README.md" "$YYYY/index.html"
"$MD2HTML_SH" "${TOOL_OPTION[@]}" -m "$YYYY/README.md" -- \
"$YYYY/README.md" "$YYYY/index.html"
status="$?"
if [[ $status -ne 0 ]]; then
echo "$0: ERROR: tool: $MD2HTML_SH ${TOOL_OPTION[*]} -- $YYYY/README.md $YYYY/index.html failed, error: $status" 1>&2
echo "$0: ERROR: tool: $MD2HTML_SH ${TOOL_OPTION[*]} -m $YYYY/README.md --" \
"$YYYY/README.md $YYYY/index.html failed, error: $status" 1>&2
exit 1
fi
# report disabled by -n
#
elif [[ $V_FLAG -ge 5 ]]; then
echo "$0: debug[5]: because of -n, did not run: $MD2HTML_SH ${TOOL_OPTION[*]} -- $YYYY/README.md $YYYY/index.html" 1>&2
echo "$0: debug[5]: because of -n, did not run: $MD2HTML_SH ${TOOL_OPTION[*]} -m $YYYY/README.md --" \
"$YYYY/README.md $YYYY/index.html" 1>&2
fi
# All Done!!! -- Jessica Noll, Age 2
+1
View File
@@ -11,6 +11,7 @@
<!-- END: this line ends content from: inc/top.default.html -->
<!-- -->
<!-- The original markdown content was formed by the tool: bin/gen-top-html.sh -->
<!-- The main part of the markdown content came from: bin/README.md -->
<!-- The HTML was converted from markdown by the tool: bin/md2html.sh -->
<!-- -->
<!-- START: this line starts content from: inc/head.default.html -->
+11 -4
View File
@@ -107,7 +107,7 @@ shopt -s lastpipe # run last command of a pipeline not executed in the backgroun
# set variables referenced in the usage message
#
export VERSION="1.0.1 2024-02-23"
export VERSION="1.1 2024-03-08"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -135,7 +135,7 @@ export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
[-c md2html.cfg] [-H phase=name ..] [-t tagline]
[-b tool] [-p tool] [-a tool]
[-s token=value ..] [-S] [-o tool ..]
[-u repo_url] [-U url] [-w site_url] [-e string ..] [-E exitcode]
[-u repo_url] [-U url] [-w site_url] [-m mdtag] [-e string ..] [-E exitcode]
[match.md] input.md output.html
-h print help message and exit
@@ -189,7 +189,7 @@ export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-D docroot/] [-n] [-N]
-U url URL of HTML being formed (def: $URL)
NOTE: The '-U url' is passed as leading options on -b tool, -a tool, and -o tool command lines.
-w site_url Base URL of the web site (def: $SITE_URL)
NOTE: The '-w site_url' is passed as leading options on -b tool, -a tool, and -o tool command lines.
-m mdtag string to write about the markdown file used to form HTML content (def: no markdown file is used)
-e string output 'string', followed by newline, to stderr (def: do not)
-E exitcode force exit with exitcode (def: exit based on success or failure of the action)
@@ -255,6 +255,7 @@ function global_variable_setup
unset OUTPUT_TOOL
declare -ag OUTPUT_TOOL
export TAGLINE="unspecified"
export MDTAG=
export MATCH_MD=
export INPUT_MD=
export OUTPUT_HTML=
@@ -368,7 +369,7 @@ function parse_command_line
# parse command line
#
while getopts :hv:VnNd:D:c:H:t:b:p:a:s:So:u:U:w:e:E: flag; do
while getopts :hv:VnNd:D:c:H:t:m:b:p:a:s:So:u:U:w:e:E: flag; do
case "$flag" in
h) print_usage 1>&2
exit 2
@@ -500,6 +501,8 @@ function parse_command_line
;;
t) TAGLINE="$OPTARG"
;;
m) MDTAG="$OPTARG"
;;
b) # parse: -p tool
if [[ $OPTARG == . ]]; then
# unset before tool
@@ -687,6 +690,7 @@ function debug_parameters
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: DO_NOT_PROCESS=$DO_NOT_PROCESS" 1>&2
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: MD2HTML_CFG=$MD2HTML_CFG" 1>&2
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: TAGLINE=$TAGLINE" 1>&2
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: MDTAG=$MDTAG" 1>&2
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: BEFORE_TOOL=$BEFORE_TOOL" 1>&2
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: AFTER_TOOL=$AFTER_TOOL" 1>&2
echo "$0: debug[$DEBUG_LEVEL]: $DBG_PREFIX: WORKING_DIR=$WORKING_DIR" 1>&2
@@ -1691,6 +1695,9 @@ if [[ -z $NOOP && ${HTML_PHASE_NAME[$CUR_PHASE_NAME]} != . ]]; then
{
echo "<!-- -->"
echo "<!-- The original markdown content was formed by the tool: $TAGLINE -->"
if [[ -n $MDTAG ]]; then
echo "<!-- The main part of the markdown content came from: $MDTAG -->"
fi
echo "<!-- The HTML was converted from markdown by the tool: bin/$NAME -->"
echo "<!-- -->"
} >> "$TMP_INDEX_HTML"
+9 -5
View File
@@ -58,7 +58,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.1 2024-02-23"
export VERSION="1.1.2 2024-03-08"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -505,12 +505,15 @@ fi
#
if [[ -z $NOOP ]]; then
if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: about to run: $MD2HTML_SH ${TOOL_OPTION[*]} -- $README_PATH $INDEX_PATH" 1>&2
echo "$0: debug[3]: about to run: $MD2HTML_SH ${TOOL_OPTION[*]} -m $README_PATH --" \
"$README_PATH $INDEX_PATH" 1>&2
fi
"$MD2HTML_SH" "${TOOL_OPTION[@]}" -- "$README_PATH" "$INDEX_PATH"
"$MD2HTML_SH" "${TOOL_OPTION[@]}" -m "$README_PATH" -- \
"$README_PATH" "$INDEX_PATH"
status="$?"
if [[ $status -ne 0 ]]; then
echo "$0: Warning: md2html.sh: $MD2HTML_SH ${TOOL_OPTION[*]} -- $README_PATH $INDEX_PATH failed, error: $status" 1>&2
echo "$0: Warning: md2html.sh: $MD2HTML_SH ${TOOL_OPTION[*]} -m $README_PATH --" \
"$README_PATH $INDEX_PATH failed, error: $status" 1>&2
EXIT_CODE="1" # exit 1
echo "$0: Warning: EXIT_CODE set to: $EXIT_CODE" 1>&2
fi
@@ -534,7 +537,8 @@ if [[ -z $NOOP ]]; then
# report disabled by -n
#
elif [[ $V_FLAG -ge 5 ]]; then
echo "$0: debug[5]: because of -n, did not run: $MD2HTML_SH ${TOOL_OPTION[*]} -- $README_PATH $INDEX_PATH" 1>&2
echo "$0: debug[5]: because of -n, did not run: $MD2HTML_SH ${TOOL_OPTION[*]} -m $README_PATH --" \
"$README_PATH $INDEX_PATH" 1>&2
fi
# All Done!!! -- Jessica Noll, Age 2
+8 -4
View File
@@ -481,12 +481,15 @@ fi
#
if [[ -z $NOOP ]]; then
if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: about to run: $MD2HTML_SH ${TOOL_OPTION[*]} -- $README_PATH $INDEX_PATH" 1>&2
echo "$0: debug[3]: about to run: $MD2HTML_SH ${TOOL_OPTION[*]} -m $README_PATH --" \
"$README_PATH $INDEX_PATH" 1>&2
fi
"$MD2HTML_SH" "${TOOL_OPTION[@]}" -- "$README_PATH" "$INDEX_PATH"
"$MD2HTML_SH" "${TOOL_OPTION[@]}" -m "$README_PATH" -- \
"$README_PATH" "$INDEX_PATH"
status="$?"
if [[ $status -ne 0 ]]; then
echo "$0: Warning: md2html.sh: $MD2HTML_SH ${TOOL_OPTION[*]} -- $README_PATH $INDEX_PATH failed, error: $status" 1>&2
echo "$0: Warning: md2html.sh: $MD2HTML_SH ${TOOL_OPTION[*]} -m $README_PATH --" \
"$README_PATH $INDEX_PATH failed, error: $status" 1>&2
EXIT_CODE="1" # exit 1
echo "$0: Warning: EXIT_CODE set to: $EXIT_CODE" 1>&2
fi
@@ -497,7 +500,8 @@ if [[ -z $NOOP ]]; then
# report disabled by -n
#
elif [[ $V_FLAG -ge 5 ]]; then
echo "$0: debug[5]: because of -n, did not run: $MD2HTML_SH ${TOOL_OPTION[*]} -- $README_PATH $INDEX_PATH" 1>&2
echo "$0: debug[5]: because of -n, did not run: $MD2HTML_SH ${TOOL_OPTION[*]} -m $README_PATH -- " \
"$README_PATH $INDEX_PATH" 1>&2
fi
# All Done!!! -- Jessica Noll, Age 2