add rules, guidelines, fix HTML code, move compressed tarball in inventory
By changing the _inventory_order_ of the compressed tarball from
**100000** to **1415926535**, the compressed tarball will land at
the top of the secondary file list and remain still easy to find.
Updated the `manifest.numbers` spreadsheet and rebuilt
the `.entry.json` files.
Added `next/` directory to hold the next IOCCC rules and guidelines.
Added `next/README.md` that `bin/gen-top-html.sh` uses to form
the `next/index.html` file.
Added _Rules and Guidelines_ link to the sidenav bar to link to the
`next/index.html` file.
Added _IOCCC Rules_ as `next/rules.md` that `bin/gen-top-html.sh`
uses to form the `next/rules.html` file.
Added _IOCCC Guidelines_ as `next/guidelines.md` that `bin/gen-top-html.sh`
uses to form the `next/guidelines.html` file.
Changed `bin/gen-top-html.sh` VERSION from "1.2.4 2024-04-13"
to "1.3 2024-04-14".
Prevent `pandoc(1)` from interpreting the commented out language
of a markdown code block as a code class. So a markdown such as:
````
``` <!---sh-->
...
```
````
that produced HTML of the form:
```html
<pre class="<!---sh-->"><code>...</code></pre>
```
will now produce HTML of the form:
```html
<pre><code>...</code></pre>
```
NOTE: Before when the language of a markdown code block
was not commented, the HTML produced by `pandoc(1)` was
oddly indented with extra whitespace on the first line
of the code block. While commenting out the language
of the code block removed some of the odd intending,
it left a weird class in the HTML pre block that
surrounded the HTML code block. This hack prevents
`pandoc(1)` from assigning a class to the HTML pre block.
Changed `in/md2html.sh` VERSION from "1.2.1 2024-04-13"
to "1.3 2024-04-14".
Added `make gen_sitemap` to end of both `make www` and `make
quick_www` in top level Makefile.
Ram `make www` to test under macOS and to perform the above.
**IMPORTANT NOTE**: The current `next/rules.md` and `next/guidelines.md`
are simply the 2020 IOCCC Rules and Guidelines converted into
markdown form. There are **NOT** the Rules and Guidelines that
will be used the IOCCC MOCK, nor the next IOCCC.
TODO: Improve the `bin/gen-status.sh` tool to modify the top of the
`next/rules.md` and `next/guidelines.md` files to keep them
in sync with the _contest_status_ as found in `status.json`.
TODO: Improve the look and feel of the `next/rules.md` and
`next/guidelines.md` markdown files.
This commit is contained in:
1 parent
a672335d2d
commit
518a6336d0
734 files changed
+7919
-4119
No files matched your search
+77
-31
@@ -141,7 +141,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.2.1 2024-04-13"
|
||||
export VERSION="1.3 2024-04-14"
|
||||
NAME=$(basename "$0")
|
||||
export NAME
|
||||
export V_FLAG=0
|
||||
@@ -1678,43 +1678,88 @@ fi
|
||||
|
||||
# input.md is -, we will need to capture standard input into a new temporary file
|
||||
#
|
||||
if [[ $INPUT_MD == - ]]; then
|
||||
export TMP_INPUT_MD=".$NAME.$$.stdin.md"
|
||||
if [[ -z $NOOP ]]; then
|
||||
if [[ $INPUT_MD == - ]]; then
|
||||
export TMP_INPUT_MD=".$NAME.$$.stdin.md"
|
||||
if [[ $V_FLAG -ge 5 ]]; then
|
||||
echo "$0: debug[5]: temporary stdin file: $TMP_INPUT_MD" 1>&2
|
||||
fi
|
||||
trap 'rm -f $TMP_SED_SCRIPT $TMP_PHASE $TMP_INDEX_HTML $TMP_INPUT_MD; exit' 0 1 2 3 15
|
||||
rm -f "$TMP_INPUT_MD"
|
||||
if [[ -e $TMP_INPUT_MD ]]; then
|
||||
echo "$0: ERROR: cannot remove temporary stdin file: $TMP_INPUT_MD" 1>&2
|
||||
exit 20
|
||||
fi
|
||||
:> "$TMP_INPUT_MD"
|
||||
if [[ ! -e $TMP_INPUT_MD ]]; then
|
||||
echo "$0: ERROR: cannot create temporary stdin file: $TMP_INPUT_MD" 1>&2
|
||||
exit 21
|
||||
fi
|
||||
|
||||
# capture standard input into the temporary stdin file
|
||||
#
|
||||
if [[ $V_FLAG -ge 5 ]]; then
|
||||
echo "$0: debug[5]: about to capture stdin into: $TMP_INPUT_MD" 1>&2
|
||||
fi
|
||||
cat > "$TMP_INPUT_MD"
|
||||
status="$?"
|
||||
if [[ $status -ne 0 ]]; then
|
||||
echo "$0: ERROR: cat into stdin file: $TMP_INPUT_MD failed, error code: $status" 1>&2
|
||||
exit 22
|
||||
fi
|
||||
|
||||
# replace 'input.md' of - with temporary stdin file
|
||||
#
|
||||
if [[ $V_FLAG -ge 5 ]]; then
|
||||
echo "$0: debug[5]: input.md arg was - is now: $TMP_INPUT_MD" 1>&2
|
||||
fi
|
||||
INPUT_MD="$TMP_INPUT_MD"
|
||||
fi
|
||||
elif [[ $V_FLAG -ge 3 ]]; then
|
||||
echo "$0: debug[3]: because of -n, temporary stdin file is not formed: $TMP_INPUT_MD" 1>&2
|
||||
fi
|
||||
|
||||
# strip commented language after markdown code block
|
||||
#
|
||||
if [[ -z $NOOP ]]; then
|
||||
|
||||
export TMP_STRIPPED_MD=".$NAME.$$.stripped.md"
|
||||
if [[ $V_FLAG -ge 5 ]]; then
|
||||
echo "$0: debug[5]: temporary stdin file: $TMP_INPUT_MD" 1>&2
|
||||
echo "$0: debug[5]: temporary stripped markdown file: $TMP_STRIPPED_MD" 1>&2
|
||||
fi
|
||||
trap 'rm -f $TMP_SED_SCRIPT $TMP_PHASE $TMP_INDEX_HTML $TMP_INPUT_MD; exit' 0 1 2 3 15
|
||||
rm -f "$TMP_INPUT_MD"
|
||||
if [[ -e $TMP_INPUT_MD ]]; then
|
||||
echo "$0: ERROR: cannot remove temporary stdin file: $TMP_INPUT_MD" 1>&2
|
||||
exit 20
|
||||
trap 'rm -f $TMP_SED_SCRIPT $TMP_PHASE $TMP_INDEX_HTML $TMP_INPUT_MD $TMP_STRIPPED_MD; exit' 0 1 2 3 15
|
||||
rm -f "$TMP_STRIPPED_MD"
|
||||
if [[ -e $TMP_STRIPPED_MD ]]; then
|
||||
echo "$0: ERROR: cannot remove temporary stripped markdown file: $TMP_STRIPPED_MD" 1>&2
|
||||
exit 23
|
||||
fi
|
||||
:> "$TMP_INPUT_MD"
|
||||
if [[ ! -e $TMP_INPUT_MD ]]; then
|
||||
echo "$0: ERROR: cannot create temporary stdin file: $TMP_INPUT_MD" 1>&2
|
||||
exit 21
|
||||
:> "$TMP_STRIPPED_MD"
|
||||
if [[ ! -e $TMP_STRIPPED_MD ]]; then
|
||||
echo "$0: ERROR: cannot create temporary stripped markdown file: $TMP_STRIPPED_MD" 1>&2
|
||||
exit 24
|
||||
fi
|
||||
|
||||
# capture standard input into the temporary stdin file
|
||||
# strip commented language after markdown code block
|
||||
#
|
||||
if [[ $V_FLAG -ge 5 ]]; then
|
||||
echo "$0: debug[5]: about to capture stdin into: $TMP_INPUT_MD" 1>&2
|
||||
fi
|
||||
cat > "$TMP_INPUT_MD"
|
||||
# We do not want the sed extended regular expression to be expanded, so
|
||||
# we put it inside single quotes.
|
||||
#
|
||||
# SC2016 (info): Expressions don't expand in single quotes, use double quotes for that.
|
||||
# https://www.shellcheck.net/wiki/SC2016
|
||||
# shellcheck disable=SC2016
|
||||
sed -E -e 's/^```[[:space:]]<!---[^-][^-]*-->/```/' "$INPUT_MD" > "$TMP_STRIPPED_MD"
|
||||
status="$?"
|
||||
if [[ $status -ne 0 ]]; then
|
||||
echo "$0: ERROR: cat into stdin file: $TMP_INPUT_MD failed, error code: $status" 1>&2
|
||||
exit 22
|
||||
echo "$0: ERROR: strip commented language after markdown code block from $INPUT_MD into file:" \
|
||||
"$TMP_INPUT_MD failed, error code: $status" 1>&2
|
||||
exit 25
|
||||
fi
|
||||
|
||||
# replace 'input.md' of - with temporary stdin file
|
||||
#
|
||||
if [[ $V_FLAG -ge 5 ]]; then
|
||||
echo "$0: debug[5]: input.md arg was - is now: $TMP_INPUT_MD" 1>&2
|
||||
fi
|
||||
INPUT_MD="$TMP_INPUT_MD"
|
||||
elif [[ $V_FLAG -ge 3 ]]; then
|
||||
echo "$0: debug[3]: because of -n, temporary stripped markdown file is not formed: $TMP_INPUT_MD" 1>&2
|
||||
fi
|
||||
|
||||
|
||||
#######################################
|
||||
# HTML phase 0: inc/top.__name__.html #
|
||||
#######################################
|
||||
@@ -2045,13 +2090,13 @@ if [[ -n $PANDOC_WRAPPER ]]; then
|
||||
#
|
||||
if [[ $V_FLAG -ge 5 ]]; then
|
||||
echo "$0: debug[5]: about to execute:" \
|
||||
"$PANDOC_WRAPPER ${P_OPTION[*]} -- $INPUT_MD - >> $TMP_INDEX_HTML" 1>&2
|
||||
"$PANDOC_WRAPPER ${P_OPTION[*]} -- $TMP_STRIPPED_MD - >> $TMP_INDEX_HTML" 1>&2
|
||||
fi
|
||||
"$PANDOC_WRAPPER" "${P_OPTION[@]}" -- "$INPUT_MD" - >> "$TMP_INDEX_HTML"
|
||||
"$PANDOC_WRAPPER" "${P_OPTION[@]}" -- "$TMP_STRIPPED_MD" - >> "$TMP_INDEX_HTML"
|
||||
status="$?"
|
||||
if [[ $status -ne 0 ]]; then
|
||||
echo "$0: ERROR: pandoc wrapper tool:" \
|
||||
"$PANDOC_WRAPPER ${P_OPTION[*]} -- $INPUT_MD - failed," \
|
||||
"$PANDOC_WRAPPER ${P_OPTION[*]} -- $TMP_STRIPPED_MD - failed," \
|
||||
"error code: $status" 1>&2
|
||||
exit 100
|
||||
fi
|
||||
@@ -2319,9 +2364,10 @@ fi
|
||||
# file cleanup
|
||||
#
|
||||
if [[ -z $NOOP ]]; then
|
||||
rm -f -- "$TMP_SED_SCRIPT" "$TMP_PHASE" "$TMP_INDEX_HTML" "$TMP_INPUT_MD"
|
||||
rm -f -- "$TMP_SED_SCRIPT" "$TMP_PHASE" "$TMP_INDEX_HTML" "$TMP_INPUT_MD" "$TMP_STRIPPED_MD"
|
||||
elif [[ $V_FLAG -ge 3 ]]; then
|
||||
echo "$0: debug[3]: because of -n, disabled: rm -f -- $TMP_SED_SCRIPT $TMP_PHASE $TMP_INDEX_HTML $TMP_INPUT_MD" 1>&2
|
||||
echo "$0: debug[3]: because of -n, disabled: rm -f --" \
|
||||
"$TMP_SED_SCRIPT $TMP_PHASE $TMP_INDEX_HTML $TMP_INPUT_MD $TMP_STRIPPED_MD" 1>&2
|
||||
fi
|
||||
|
||||
# All Done!!! -- Jessica Noll, Age 2
|
||||
|
||||
Reference in new issue
Block a user