improve the status.html page

Changed `bin/gen-status.sh` VERSION from "1.0 2024-03-09"
to "1.1 2024-03-10".

Changed `bin/status2html.sh` VERSION from "1.0 2024-03-09"
to "1.1 2024-03-10".

Improved for explanatory text added near the top of the
`index.html` page by `bin/status2html.sh`.

While `bin/status2html.sh` in intended as tool that is internally
called only, we allowed for a 0 arg use for those who are simply
curious as to what it does.

Tested various _contest_status_ values with `bin/gen-status.sh`.
This resulted in a forced change of _status_update_ in `status.json`.

Removed extraneous whitespace from `bin/output-index-author.sh`.

Performed `make www` to finalize all of the above, although a
`make gen_status` followed by `make gen_sitemap` would have
been sufficient.
This commit is contained in:
Landon Curt Noll committed 2024-03-10 14:09:00 -07:00
1 parent fc3ecfaeee
commit 449205e1a5
7 files changed
+123 -14

No files matched your search

+24 -4
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-03-09"
export VERSION="1.1 2024-03-10"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -586,12 +586,33 @@ fi
# XXX - XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - XXX
#
if [[ -z $CONTEST_STATUS ]]; then
# obtain the contest_status from status.json
#
CONTEST_STATUS=$(grep '"contest_status"\s*:\s*"[^"][^"]*"' "$STATUS_JSON" | sed -e 's/",\s*$//' -e 's/^.*"//')
status="$?"
if [[ $status -ne 0 || -z $CONTEST_STATUS ]]; then
echo "$0: ERROR: cannot determine contest_status from status.json: $STATUS_JSON" 1>&2
exit 1
fi
# validate and normalize the contest_status cfrom status.json
#
case "$CONTEST_STATUS" in
p|pending) CONTEST_STATUS="pending"
;;
o|open) CONTEST_STATUS="open"
;;
j|judging) CONTEST_STATUS="judging"
;;
c|closed) CONTEST_STATUS="closed"
;;
*) echo "$0: ERROR: unexpected status from $status.json: $CONTEST_STATUS" 1>&2
echo 1>&2
echo "$USAGE" 1>&2
exit 1
;;
esac
fi
# -N stops early before any processing is performed
@@ -726,11 +747,10 @@ if [[ -z $NOOP ]]; then
status.md "$STATUS_HTML"
status="$?"
if [[ $status -ne 0 ]]; then
echo "$0: Warning: md2html.sh: $MD2HTML_SH ${TOOL_OPTION[*]} --" \
echo "$0: ERROR: md2html.sh: $MD2HTML_SH ${TOOL_OPTION[*]} --" \
"status.md $STATUS_HTML" \
"failed, error: $status" 1>&2
EXIT_CODE="1" # exit 1
echo "$0: Warning: EXIT_CODE set to: $EXIT_CODE" 1>&2
exit 20
elif [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: now up to date: $STATUS_HTML" 1>&2
fi
+1 -1
View File
@@ -114,7 +114,7 @@ Exit codes:
5 some internal tool is not found or not an executable file
6 problems found with or in the topdir or topdir/YYYY directory
7 problems found with or in the entry topdir/YYYY/dir directory
8 error in author/author_handle.json file
8 error in author/author_handle.json file
>= 10 internal error
$NAME version: $VERSION"
+80 -3
View File
@@ -53,7 +53,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-03-09"
export VERSION="1.1 2024-03-10"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -189,8 +189,8 @@ shift $(( OPTIND - 1 ));
if [[ $V_FLAG -ge 5 ]]; then
echo "$0: debug[5]: file argument count: $#" 1>&2
fi
if [[ $# -ne 1 ]]; then
echo "$0: ERROR: expected 1 arg, found: $#" 1>&2
if [[ $# -ge 2 ]]; then
echo "$0: ERROR: expected 0 or 1 args, found: $#" 1>&2
exit 3
fi
if [[ $V_FLAG -ge 5 ]]; then
@@ -336,9 +336,86 @@ elif [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: because of -n, temporary markdown file is not used: $TMP_FILE" 1>&2
fi
# obtain the contest_status from status.json
#
CONTEST_STATUS=$(grep '"contest_status"\s*:\s*"[^"][^"]*"' "$STATUS_JSON" | sed -e 's/",\s*$//' -e 's/^.*"//')
status="$?"
if [[ $status -ne 0 || -z $CONTEST_STATUS ]]; then
echo "$0: ERROR: cannot determine contest_status from status.json: $STATUS_JSON" 1>&2
exit 8
fi
# validate and normalize the contest_status cfrom status.json
#
case "$CONTEST_STATUS" in
p|pending) CONTEST_STATUS="pending"
;;
o|open) CONTEST_STATUS="open"
;;
j|judging) CONTEST_STATUS="judging"
;;
c|closed) CONTEST_STATUS="closed"
;;
*) echo "$0: ERROR: unexpected status from $status.json: $CONTEST_STATUS" 1>&2
echo 1>&2
echo "$USAGE" 1>&2
exit 8
;;
esac
# write temporary markdown file for status.json
#
{
# write status of the contest
#
case "$CONTEST_STATUS" in
pending) echo "# The IOCCC is not yet open"
echo
echo "While the IOCCC is not open now, there is a tentative opening date for the next IOCCC."
echo
echo "See the [IOCCC news](news.html) for details including the tentative" \
"scheduled opening date."
echo
echo "A preliminary IOCCC rules, guidelines, and tools have been posted." \
"Comments and suggestions on these preliminary items are welcome."
;;
open) echo "# The IOCCC open for submissions"
echo
echo "See the [IOCCC news](news.html) page for details on rules, guidelines, tools and deadlines."
echo
echo "See [How to enter the IOCCC](faq.html#submit) FAQ for additional information."
echo
echo "**IMPORTANT**: If you viewed the preliminary IOCCC rules, guidelines, and tools while the IOCCC status" \
"was pending, be sure to review the official IOCCC rules, guidelines, and tools for any changes that may" \
"have been recently made before submitting to the IOCCC."
;;
judging) echo "# The IOCCC is closed to new submissions"
echo
echo "The [IOCCC judges](judges.html) are in the process of judging the submissions they received" \
"the IOCCC was open."
echo
echo "Watch the [@IOCCC mastodon feed](https://fosstodon.org/@ioccc), as well as the" \
"[IOCCC news](news.html) page for updates."
;;
closed) echo "# The IOCCC is closed"
echo
echo "The IOCCC is **NOT** accepting new submissions at this time. See the" \
"[IOCCC winning entries page](years.html) for the entires that have won the IOCCC."
echo
echo "Watch both [the IOCCC status page](status.html) and the" \
"[@IOCCC mastodon feed](https://fosstodon.org/@ioccc) for information about future IOCCC openings."
;;
*) echo "# The IOCCC status is unknown"
echo
echo "The IOCCC status is an unexpected status value: $CONTEST_STATUS"
echo
echo "This is a **BUG**, not a feature. Feel free to report it!"
;;
esac
echo
# write status.json content
#
echo '# <a name="content"></a>status.json'
echo '```json'
cat "$STATUS_JSON"
+4 -4
View File
@@ -19150,7 +19150,7 @@
</url>
<url>
<loc>https://ioccc-src.github.io/temp-test-ioccc/bin/gen-status.sh</loc>
<lastmod>2024-03-10T03:06:23+00:00</lastmod>
<lastmod>2024-03-10T20:23:09+00:00</lastmod>
</url>
<url>
<loc>https://ioccc-src.github.io/temp-test-ioccc/bin/gen-top-html.sh</loc>
@@ -19178,7 +19178,7 @@
</url>
<url>
<loc>https://ioccc-src.github.io/temp-test-ioccc/bin/output-index-author.sh</loc>
<lastmod>2024-03-09T00:06:59+00:00</lastmod>
<lastmod>2024-03-10T20:58:58+00:00</lastmod>
</url>
<url>
<loc>https://ioccc-src.github.io/temp-test-ioccc/bin/output-index-inventory.sh</loc>
@@ -19210,7 +19210,7 @@
</url>
<url>
<loc>https://ioccc-src.github.io/temp-test-ioccc/bin/status2html.sh</loc>
<lastmod>2024-03-10T03:16:40+00:00</lastmod>
<lastmod>2024-03-10T20:59:43+00:00</lastmod>
</url>
<url>
<loc>https://ioccc-src.github.io/temp-test-ioccc/bin/subst.default.sh</loc>
@@ -19414,7 +19414,7 @@
</url>
<url>
<loc>https://ioccc-src.github.io/temp-test-ioccc/status.json</loc>
<lastmod>2024-03-10T17:01:12+00:00</lastmod>
<lastmod>2024-03-10T20:55:10+00:00</lastmod>
</url>
<url>
<loc>https://ioccc-src.github.io/temp-test-ioccc/thanks-for-help.html</loc>
+11 -1
View File
@@ -115,6 +115,14 @@
<!-- START: this line starts content generated by: bin/status2html.sh -->
<h1 id="the-ioccc-is-closed">The IOCCC is closed</h1>
<p>The IOCCC is <strong>NOT</strong> accepting new submissions at this
time. See the <a href="years.html">IOCCC winning entries page</a> for
the entires that have won the IOCCC.</p>
<p>Watch both <a href="status.html">the IOCCC status page</a> and the <a
href="https://fosstodon.org/@ioccc"><span class="citation"
data-cites="IOCCC">@IOCCC</span> mastodon feed</a> for information about
future IOCCC openings.</p>
<h1 id="status.json"><a name="content"></a>status.json</h1>
<div class="sourceCode" id="cb1"><pre
class="sourceCode json"><code class="sourceCode json"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">{</span></span>
@@ -122,7 +130,7 @@ class="sourceCode json"><code class="sourceCode json"><span id="cb1-1"><a href="
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;IOCCC_status_version&quot;</span> <span class="fu">:</span> <span class="st">&quot;1.0 2024-03-09&quot;</span><span class="fu">,</span></span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;contest_status&quot;</span> <span class="fu">:</span> <span class="st">&quot;closed&quot;</span><span class="fu">,</span></span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;news_update&quot;</span> <span class="fu">:</span> <span class="st">&quot;2024-03-10T17:01:11+00:00&quot;</span><span class="fu">,</span></span>
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;status_update&quot;</span> <span class="fu">:</span> <span class="st">&quot;2024-03-10T17:01:12+00:00&quot;</span></span>
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;status_update&quot;</span> <span class="fu">:</span> <span class="st">&quot;2024-03-10T20:55:10+00:00&quot;</span></span>
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div>
<!-- END: next line ends content generated by: bin/status2html.sh -->
@@ -159,6 +167,8 @@ Comments and suggestions on these preliminary items are welcome. See the
scheduled opening date.</p>
<h4 id="open">“<strong>open</strong>”</h4>
<p>The IOCCC is open for submissions.</p>
<p>See the <a href="news.html">IOCCC news</a> page for details on rules,
guidelines, tools and deadlines.</p>
<p>Be sure to review the official IOCCC rules, guidelines, and tools for
any changes that may have been made while the IOCCC was
“<strong>pending</strong>”.</p>
+1 -1
View File
@@ -3,5 +3,5 @@
"IOCCC_status_version" : "1.0 2024-03-09",
"contest_status" : "closed",
"news_update" : "2024-03-10T17:01:11+00:00",
"status_update" : "2024-03-10T17:01:12+00:00"
"status_update" : "2024-03-10T20:55:10+00:00"
}
+2
View File
@@ -46,6 +46,8 @@ scheduled opening date.
The IOCCC is open for submissions.
See the [IOCCC news](news.html) page for details on rules, guidelines, tools and deadlines.
Be sure to review the official IOCCC rules, guidelines, and tools
for any changes that may have been made while the IOCCC was "**pending**".