add initial .winner.json and .inventory.html for winners
Fixed an incorrect author win for "1989_jar.2" in `author_wins.numbers` and `author_wins.csv`. Changed winner_JSON_format_version to "0.5 2023-11-04". Added `gen_dot_winner.sh` tool to generate .winner.json and .inventory.html for a winner. This tool uses [pandoc](https://pandoc.org) to convert markdown to HTML. Used this command to generate `.winner.json` and `.inventory.html` for all winners: ```sh ./run_all.sh -v 1 -D 1 ./gen_dot_winner.sh ``` Updated `tmp/README.md` to reflect the above. Retired "fake.gen_inventory.sh" to `tmp/OLD_manifest/fake.gen_inventory.sh`. Added `-D level` flag to `run_all.sh` to specify the `-v level` for the tool that is being run.
This commit is contained in:
1 parent
bad6f8f630
commit
4f88c4214b
654 files changed
+127249
-12882
No files matched your search
+12
-8
@@ -36,6 +36,7 @@ NAME=$(basename "$0"); export NAME
|
||||
EXIT_CODE=0
|
||||
#
|
||||
export V_FLAG=0
|
||||
export CAP_D_FLAG=0
|
||||
export DOMAIN="ioccc-src.github.io"
|
||||
export DOCPATH="/temp-test-ioccc"
|
||||
export GITHUB_REPO="https://github.com/ioccc-src/temp-test-ioccc"
|
||||
@@ -44,12 +45,13 @@ export WINNER_DIR_TXT="winner_dir.txt"
|
||||
|
||||
# usage
|
||||
#
|
||||
export USAGE="usage: $0 [-h] [-v level] [-d www.domain.org] [-p /path/to/docroot] [-g github_url ] [-t topdir]
|
||||
[-w winner_dir.txt]
|
||||
export USAGE="usage: $0 [-h] [-v level] [-D level]
|
||||
[-d www.domain.org] [-p /path/to/docroot] [-g github_url ] [-t topdir] [-w winner_dir.txt]
|
||||
tool
|
||||
|
||||
-h print help message and exit
|
||||
-v level set verbosity level (def level: $V_FLAG)
|
||||
-D level set verbosity level (via -v level) in tool: (def level: $CAP_D_FLAG)
|
||||
|
||||
-d www.domain.org change domain (def: $DOMAIN)
|
||||
-p /path/to/docroot use path under domain to document root (def: $DOCPATH)
|
||||
@@ -67,20 +69,22 @@ Exit codes:
|
||||
4 cannot find writable winner directory
|
||||
5 tool is not an executable file
|
||||
6 missing winner directory as found in winner_dir.txt
|
||||
7 a tool run faoled
|
||||
7 tool exited non-zero
|
||||
>= 10 internal error
|
||||
|
||||
$NAME version: $VERSION"
|
||||
|
||||
# parse command line
|
||||
#
|
||||
while getopts :hv:d:p:g:t:w: flag; do
|
||||
while getopts :hv:D:d:p:g:t:w: flag; do
|
||||
case "$flag" in
|
||||
h) echo "$USAGE"
|
||||
exit 2
|
||||
;;
|
||||
v) V_FLAG="$OPTARG"
|
||||
;;
|
||||
D) CAP_D_FLAG="$OPTARG"
|
||||
;;
|
||||
d) DOMAIN="$OPTARG"
|
||||
;;
|
||||
p) DOCPATH="$OPTARG"
|
||||
@@ -193,13 +197,13 @@ done
|
||||
#
|
||||
for dir in $(< "$WINNER_DIR_TXT"); do
|
||||
if [[ $V_FLAG -ge 1 ]]; then
|
||||
echo "$0: debug[1]: $TOOL -d $DOMAIN -p $DOCPATH -g $GITHUB_REPO -t $TOPDIR -- $dir" 1>&2
|
||||
echo "$0: debug[1]: $TOOL -d $DOMAIN -p $DOCPATH -g $GITHUB_REPO -t $TOPDIR -v $CAP_D_FLAG -- $dir" 1>&2
|
||||
fi
|
||||
$TOOL -d "$DOMAIN" -p "$DOCPATH" -g "$GITHUB_REPO" -t "$TOPDIR" -- "$dir"
|
||||
$TOOL -d "$DOMAIN" -p "$DOCPATH" -g "$GITHUB_REPO" -t "$TOPDIR" -v "$CAP_D_FLAG" -- "$dir"
|
||||
status="$?"
|
||||
if [[ $status -ne 0 ]]; then
|
||||
echo "$0: Warning: $TOOL -d $DOMAIN -p $DOCPATH -g $GITHUB_REPO -t $TOPDIR -- $dir exit code: $status" 1>&2
|
||||
EXIT_CODE="7"
|
||||
echo "$0: Warning: $TOOL -d $DOMAIN -p $DOCPATH -g $GITHUB_REPO -t $TOPDIR -v $CAP_D_FLAG -- $dir exit code: $status" 1>&2
|
||||
EXIT_CODE="7" # exit 7
|
||||
elif [[ $V_FLAG -ge 3 ]]; then
|
||||
echo "$0: debug[3]: success" 1>&2
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user