build index.html for all winners

Updated manifest as per recent file changes.

Updated winner `.winner.json` to reflect the manifest changes.

Added [bin/all_run.sh](bin/all_run.sh) tool to run a command over
all winning entries.

These tools had slight improvements in the help usage message:

* bin/gen-author.sh VERSION="1.3.1 2024-01-16"
* bin/gen-inventory.sh VERSION="1.0.1 2024-01-16"
* bin/pandoc_wrapper.sh VERSION="1.3.1 2024-01-16"
* bin/subst.default.sh VERSION="1.1.1 2024-01-16"
* bin/subst.winner-index.sh VERSION="1.1.1 2024-01-16"

The `bin/readme2index.sh` tool was improved so that
if the `index.html` file exists and the tool forms
the exact same content, then the file `index.html`
file is NOT touched.

* bin/readme2index.sh VERSION="1.1 2024-01-16"

We used the following command to generate `index.html` files
for all winning entries:

```sh
bin/all_run.sh -v 3 bin/readme2index.sh
```

NOTE: We have not (yet) built HTML files above the winner directory
level (e.g., no year level nor top level HTML), nor have be built
non-index HTML files for winners.

NOTE: By default we are running `pandoc(1)` with:

```
--fail-if-warnings=true
```

This means that any problems with markdown to HTML
generates an error.  This is done to be sure that
the HTML conversion is clean.

We had to fix the following `README.md` files:

* `2000/rince/README.md`

The reference [^2] was never used.  We made a guess that [^2] applies
to the same spot as [^1].  Perhaps there is a better spot where
[^2] applies?

NOTE: For every reference, there MUST be some place where that
reference is used.

* 2012/vik/README.md

The string "$...$" is assumed to be a TeX encoded string.

NOTE: Every "$..$" needs to be backslashed as in "\$..\$".

* 2018/burton1/README.md

The reference [2] was duplicated.  We changed the
second [2] to [3].

NOTE: Every reference needs to have a unique number.

* 2020/carlini/README.md

The string "$...$" is assumed to be a TeX encoded string.

NOTE: Every "$..$" needs to be backslashed as in "\$..\$".

We also found 2 errors in the `author/author_handle.json` file set:

* author/Anonymous_2001.json

The `author/Anonymous_2001.json` file was missing.

* author/Jari_Arkko.json

The winner ID for `1989_jar.1` had a typo.
This commit is contained in:
Landon Curt Noll committed 2024-01-17 00:32:39 -08:00
1 parent 893cd915b6
commit c1466f5165
350 files changed
+95242 -4217

No files matched your search

+35 -15
View File
@@ -55,7 +55,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 2024-01-14"
export VERSION="1.1 2024-01-16"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -77,8 +77,8 @@ export TOP_URL="https://ioccc-src.github.io/temp-test-ioccc"
# set usage message
#
export USAGE="usage: $0 [-h] [-v level] [-V] [-n] [-N]
[-d topdir] [-c md2html.cfg] [-H phase=name ..]
export USAGE="usage: $0 [-h] [-v level] [-V] [-d topdir] [-n] [-N]
[-c md2html.cfg] [-H phase=name ..]
[-b tool] [-B optstr] [-p tool] [-P optstr] [-a tool] [-A optstr]
[-s token=value ..] [-S] [-o tool ..] [-O tool=optstr ..]
[-u repo_url] [-U top_url] [-e string ..] [-E exitcode]
@@ -88,12 +88,12 @@ export USAGE="usage: $0 [-h] [-v level] [-V] [-n] [-N]
-v level set verbosity level (def level: $V_FLAG)
-V print version string and exit
-n go thru the actions, but do not update any files (def: do the action)
-N do not process file, just parse arguments and ignore the file (def: process the file)
-d topdir set topdir (def: $TOPDIR)
NOTE: -d may only be used in command_options (getopt phase 0)
-n go thru the actions, but do not update any files (def: do the action)
-N do not process file, just parse arguments and ignore the file (def: process the file)
-c md2html.cfg Use md2html.cfg as the configuration file (def: use topdir/inc/md2html.cfg)
NOTE: -c may only be used in command_options (getopt phase 0)
@@ -2030,16 +2030,36 @@ fi
# move temporary index HTML in place
#
if [[ -z $NOOP ]]; then
mv -f -- "$TMP_INDEX_HTML" "$INDEX_PATH"
status="$?"
if [[ status -ne 0 ]]; then
echo "$0: ERROR: mv -f -- $TMP_INDEX_HTML $INDEX_PATH filed, error code: $status" 1>&2
exit 138
fi
if [[ ! -s $INDEX_PATH ]]; then
echo "$0: ERROR: not a non-empty index HTML file: $INDEX_PATH" 1>&2
exit 139
# compare files
#
if cmp -s "$TMP_INDEX_HTML" "$INDEX_PATH"; then
# case: file did not change
#
if [[ $V_FLAG -ge 5 ]]; then
echo "$0: debug[5]: file did not change: $INDEX_PATH" 1>&2
fi
else
# case: index.html changed, update the file
#
if [[ $V_FLAG -ge 5 ]]; then
echo "$0: debug[5]: mv -f -- $TMP_INDEX_HTML $INDEX_PATH" 1>&2
fi
mv -f -- "$TMP_INDEX_HTML" "$INDEX_PATH"
status="$?"
if [[ status -ne 0 ]]; then
echo "$0: ERROR: mv -f -- $TMP_INDEX_HTML $INDEX_PATH filed, error code: $status" 1>&2
exit 138
fi
if [[ ! -s $INDEX_PATH ]]; then
echo "$0: ERROR: not a non-empty index HTML file: $INDEX_PATH" 1>&2
exit 139
fi
fi
elif [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: because of -n, disabled: mv -f -- $TMP_INDEX_HTML $INDEX_PATH" 1>&2
fi