fix and improve links within the web site

Entry source is now prog.c for IOCCC years 2014 thru 2020,
or is now dirname.c IOCCC years 1984 thru 2013.

To achieve this state, we renamed the following:

renamed:    2004/hibachi/src/hibachi.c -> 2004/hibachi/hibachi.c
renamed:    2012/omoikane/nyaruko.alt.c -> 2012/omoikane/omoikane.alt.c
renamed:    2012/omoikane/nyaruko.alt2.c -> 2012/omoikane/omoikane.alt2.c
renamed:    2012/omoikane/nyaruko.c -> 2012/omoikane/omoikane.c
renamed:    2012/omoikane/nyaruko.orig.c -> 2012/omoikane/omoikane.orig.c

Modified `bin/subst.entry-index.sh` to add to entry `index.html` file,
links to the `Makefile` and the _C code_ to the top navigation bar.
Changed `bin/subst.entry-index.sh` VERSION from "1.2.2 2024-02-25"
to "1.3 2024-03-02".

Moved printing the Inventory link in the top navigation bar
from `bin/subst.entry-navbar.awk` to `bin/subst.entry-index.sh`.
Changed `bin/subst.entry-navbar.awk` VERSION from "1.0.1 2024-02-23"
to "1.1 2024-03-02".

Moved printing the Inventory link in the top navigation bar
from `bin/subst.year-navbar.awk` to `bin/subst.year-index.sh`.
Changed `bin/subst.year-index.sh` VERSION from "1.0 2024-02-11"
to "1.1 2024-03-02".
Changed `bin/subst.year-navbar.awk` VERSION from "1.0 2024-02-11"
to "1.1 2024-03-02".

Added location names (both default and common) to `author.html`.
Changed `tmp/gen_author_json.sh` VERSION from "1.0 2023-06-06"
to "1.1 2024-03-04".

Added location names (both default and common) to `author.html`.
Changed `bin/gen-authors.sh` VERSION from "1.2 2024-03-09"
to "1.3 2024-03-04".

The manifest and the resulting `.entry.json` files have been changed
for `2004/hibachi` and `2012/omoikane`.

The Makefiles for  `2004/hibachi` and `2012/omoikane` copy the
source file into the "previously used location".  The `make clobber`
rule removes the copied source.  The `.gitignore` files have been
updated accordingly.

Improved how the concept of IOCCC terms _entry_, _author_ and _submission_ are
used in markdown files.

Links to markdown files (files ending in .md) within the repo were
changed to link to HTML files (files ending in .html).  Special cases
where `README.md` became `index.html` were modified accordingly.

Fixed URL for `bugs.html` in Makefile comments.

Fixed name of `bin/sgi.sh` referenced in comments in `.gitignore` files.

Links to locations within the repo are now relative.  For example a
link to `/contact.html` may become `../contact.html' or '../../contact.html`
depending on the directory level of the markdown file.

Nearly all links with absolute URLs under _https://www.ioccc.org_
or `https://ioccc-src.github.io/temp-test-ioccc_ have been changed to
relative paths within the repo.  Some exceptions to this (such as
referring to a GitHub repo) were preserved.

Fixed a number of inside `faq.md` and `bugs.md`.

Added HTML name tags (in the form of an _entry_id_) for each entry
referenced in `bugs.md`.  Fixed links from outside of `bugs.html`
into `bugs.html` accordingly.

Where FAQ entries are referenced, a named tag is used so that if a
FAQ is ever renumbered, links outside of `faq.html` will still work.

Changed the _inventory_order_ of a compressed tarball from _300_
to _100000_.  While this may have been done for the manifest,
this changed had not yet been propagated into the `.entry.json` files.

Links to web sites that were in the for <URL> are now [URL](URL).

Performed `name www` to process all of the above.

Improved format of `authors.html`.  Full names are now bold.
Location codes are now links back into `location.html` and
location names (both default and common) are now italics.
Added _author_handle_ each author.

Changed `bin/gen-authors.sh` VERSION from "1.1 2024-02-25"
to "1.2 2024-03-09".

Improved format of `location.html` as location codes are now bold,
author counts in a given location are now bold, and location names
(both default and common) are now italics.

Changed `bin/gen-location.sh` VERSION from "1.0.1 2024-02-23"
to "1.1 2024-03-04".

Added italic location name after location code in entry
`index.html` files.

Changed `bin/output-index-author.sh` VERSION from "1.4.1 2024-02-23"
to "1.5 2024-03-04".

Added _Location of authors_ to the sidebar as a link to `location.html`.

TODO: While nearly all of the above mentioned changes are likely correct,
      they likely introduced a few errors that need correcting.
This commit is contained in:
Landon Curt Noll committed 2024-03-04 23:45:28 -08:00
1 parent 91c55a20fd
commit 2b92c89be8
1811 files changed
+11313 -9962

No files matched your search

+33 -27
View File
@@ -1,11 +1,11 @@
# bin
The directory holds [bin](README.md) directory
The directory holds [bin](index.html) directory
holds tools that build files, such as HTML content, for the
[official IOCCC web site](https://www.ioccc.org).
For HTML content, the [bin](README.md) directory tools
makes use of HTML fragments from the [inc](../inc/README.md) directory
For HTML content, the [bin](index.html) directory tools
makes use of HTML fragments from the [inc](../inc/index.html) directory
as well as various JSON files and other content from the
[IOCCC GitHub repo](https://github.com/ioccc-src/temp-test-ioccc).
@@ -93,7 +93,7 @@ bin/gen-location.sh -v 1
### [gen-other-html.sh](gen-other-html.sh)
Generate entry HTML files from markdown other than README.md to index.html HTML files.
Generate entry HTML files from markdown other than index.html to index.html HTML files.
Usage:
@@ -124,12 +124,18 @@ bin/gen-top-html.sh -v 1
Examples of top level HTML pages built by this tool include:
- [CODE_OF_CONDUCT.html](CODE_OF_CONDUCT.html)
- [README.html](README.html)
- [bugs.html](bugs.html)
- [contact.html](contact.html)
- [faq.html](faq.html)
- [thanks-for-help.html](thanks-for-help.html)
- [CODE_OF_CONDUCT.html](../CODE_OF_CONDUCT.html)
- [archive/historic/index.html](../archive/historic/index.html)
- [bin/index.html](../bin/index.html)
- [bugs.html](../bugs.html)
- [contact.html](../contact.html)
- [faq.html](../faq.html)
- [inc/index.html](../inc/index.html)
- [index.html](../index.html)
- [thanks-for-help.html](../thanks-for-help.html)
- [judges.html](../judges.html)
- [news.html](../news.html)
- [thanks-for-help.html](../thanks-for-help.html)
### [gen-year-index.sh](gen-year-index.sh)
@@ -156,7 +162,7 @@ bin/gen-years.sh -v 1
### [ioccc-status.sh](ioccc-status)
Updates the [status.json](/status.json) file.
Updates the [status.json](../status.json) file.
### [manifest.entry.json.awk](manifest.entry.json.awk)
@@ -168,7 +174,7 @@ Output manifest table from a entry .entry.json file.
This is the primary tool that forms IOCCC generated HTML content from
markdown files (permanent markdown files or temporarily generated
markdown files) and HTML fragments from the [inc](/inc) directory.
markdown files) and HTML fragments from the [inc](../inc/index.html) directory.
The [../inc/md2html.cfg](../inc/md2html.cfg) configuration file is
used by [md2html.sh](md2html.sh) to drive the generation process.
@@ -198,11 +204,11 @@ Wrapper tool to run pandoc.
Runs [readme2index.sh](readme2index.sh) if the entry directory
does not have a non-empty `index.hmtl` file, or if either
`.entry.json` or `README.md` is newer than the `index.hmtl` file.
`.entry.json` or `index.html` is newer than the `index.hmtl` file.
This is useful when only a few entries have been
modified (resulting in an updated `.entry.json` file)
or if the `README.md` of a few entries have been changed.
or if the `index.html` of a few entries have been changed.
While the [readme2index.sh](readme2index.sh) take a few
seconds to run, when applied to 300+ entries,
@@ -218,7 +224,7 @@ bin/all-run.sh -v 3 bin/quick-readme2index.sh -v 1
**NOTE**: This command assumes that the relative
modification times for `index.hmtl`, .entry.json`,
and `README.md` are correct. If in doubt, use:
and `index.html` are correct. If in doubt, use:
```sh
bin/all-run.sh -v 3 bin/readme2index.sh -v 1
@@ -227,7 +233,7 @@ bin/all-run.sh -v 3 bin/readme2index.sh -v 1
### [readme2index.sh](readme2index.sh)
Convert a entry README.md into entry directory index.html.
Convert a entry index.html into entry directory index.html.
### [sgi.sh](sgi.sh)
@@ -337,15 +343,15 @@ site](https://www.ioccc.org).
Nearly all IOCCC related HTML pages are built from markdown files,
from either permanent markdown files or temporary generated markdown files,
as well as HTML fragments from the [inc](../inc/README.md) directory.
as well as HTML fragments from the [inc](../inc/index.html) directory.
Most HTML content is built from permanant markdown files, such as a `README.md`
Most HTML content is built from permanant markdown files, such as a `index.html`
markdown file found in each entry directory. Some HTML content are generated
from temporary markdown files. These temporary markdown files are produced by
tools in the [bin](README.md) directory and exist only while the tool is running.
tools in the [bin](index.html) directory and exist only while the tool is running.
In addition to converting markdown to HTML, the canonical way that HTML content is
built uses, by default, files from the [inc](../inc/README.md) directory, of the form:
built uses, by default, files from the [inc](../inc/index.html) directory, of the form:
```
*.default.html
@@ -522,17 +528,17 @@ and except 'after tool' output), or command will exit non-zero, unless -S is giv
only a warning about un-substituted tokens will be written to stderr.
The command line of tools in the [bin](README.md) directory,
The command line of tools in the [bin](index.html) directory,
and perhaps modified via [md2html config file](../inc/md2html.cfg) file may change
to using a different filename for a given phase.
For example when forming the HTML from `2020/ferguson2/chocolate-cake.md`,
For example when forming the HTML from `2020/ferguson2/chocolate-cake.html`,
a different "topnav" navigation bar is needed. So instead of the
usual top navigation bar that normally directs people to the previous
entry for the year, or go up to the year page, or to the next entry
for the year, a top navigation bar to just go up to the entry's
main page is needed. A line in the [md2html config file](../inc/md2html.cfg) file
that refers to `2020/ferguson1/chocolate-cake.md` may specify use
that refers to `2020/ferguson1/chocolate-cake.html` may specify use
of `topnav.up2index.html` instead of using the `topnav.default.html` default.
The HTML phase may be skipped resulting in no HTML output during a given phase.
@@ -551,7 +557,7 @@ on the [official IOCCC web site](https://www.ioccc.org).
These files are used to form **MOST** of the HTML content
on the [experimental web site](https://ioccc-src.github.io/temp-test-ioccc/).
... and in particular files under [inc](../inc/README.md) that are of the form (called default HTML files) ...:
... and in particular files under [inc](../inc/index.html) that are of the form (called default HTML files) ...:
```
*.default.html
@@ -567,7 +573,7 @@ not impact **MOST** of the HTML content.
# Why do we do not use certain well-known HTML technologies
You may wonder why we need these files in the first place.
You may wonder why we even need the tools in the [bin](README.md) directory
You may wonder why we even need the tools in the [bin](index.html) directory
when there other solutions available to form web pages.
@@ -724,7 +730,7 @@ The latter form is in case there are more than one anonymous author in a given
year.
NOTE: even if the directory name is not `anonymous` the above rules apply as in
in the case of [2005/anon](/2005/anon/anon.c).
in the case of [2005/anon](../2005/anon/anon.c).
Anonymous `author_handle`'s match this regexp:
@@ -775,7 +781,7 @@ Each `year` will have a file directory under it named:
```
The contents of the `.year` file is the year string of the directory. For
instance, [2020/.year](/2020/.year) has the string: `2020`.
instance, [2020/.year](,,/2020/.year) has the string: `2020`.
## `dir`
+34 -13
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.1 2024-02-25"
export VERSION="1.3 2024-03-04"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -813,23 +813,44 @@ EOF
LOCATION_NAME=$("$LOCATION_TOOL" "$LOCATION_CODE" 2>/dev/null)
status="$?"
if [[ $status -ne 0 ]]; then
echo "$0: ERROR: cannot determine location name for location ISO 3166 code: $LOCATION_CODE" 1>&2
echo "$0: ERROR: cannot determine location name" \
"for location ISO 3166 code: $LOCATION_CODE" 1>&2
exit 18
fi
if [[ -z $LOCATION_NAME ]]; then
echo "$0: ERROR: location name for location ISO 3166 code: $LOCATION_CODE is empty: $LOCATION_NAME" 1>&2
echo "$0: ERROR: location name" \
"for location ISO 3166 code: $LOCATION_CODE is empty: $LOCATION_NAME" 1>&2
exit 19
fi
LOCATION_COMMON_NAME=$("$LOCATION_TOOL" -c "$LOCATION_CODE" 2>/dev/null)
status="$?"
if [[ $status -ne 0 ]]; then
echo "$0: ERROR: cannot determine location common name" \
"for location ISO 3166 code: $LOCATION_CODE" 1>&2
exit 20
fi
if [[ -z $LOCATION_COMMON_NAME ]]; then
echo "$0: ERROR: location common name" \
"for location ISO 3166 code: $LOCATION_CODE is empty: $LOCATION_COMMON_NAME" 1>&2
exit 21
fi
AUTHOR_HANDLE=$(output_author_handle "$filename")
if [[ -z $AUTHOR_HANDLE ]]; then
echo "$0: ERROR: author handle is empty in: $filename" 1>&2
exit 20
exit 22
fi
# output author information
#
echo "<p><a name=\"$AUTHOR_HANDLE\"></a>$FULL_NAME</br>"
echo "Location: $LOCATION_CODE - $LOCATION_NAME</p>"
echo "<p><a name=\"$AUTHOR_HANDLE\"></a>**$FULL_NAME**</br>"
echo "author_handle: $AUTHOR_HANDLE</br>"
if [[ $LOCATION_NAME == $LOCATION_COMMON_NAME ]]; then
echo "Location: [$LOCATION_CODE](location.html#$LOCATION_CODE) -" \
"_${LOCATION_NAME}_</p>"
else
echo "Location: [$LOCATION_CODE](location.html#$LOCATION_CODE) -" \
"_${LOCATION_NAME}_ (_${LOCATION_COMMON_NAME}_)</p>"
fi
# output YYYY/dir set made bu this author
#
@@ -843,12 +864,12 @@ EOF
fi
else
echo "$0: ERROR: entry_id is not in YYYY_dir formmat: $entry_id" 1>&2
exit 21
exit 23
fi
YYYY_DIR=$(echo "$ENTRY_ID" | tr _ /)
if [[ ! -d $YYYY_DIR ]]; then
echo "$0: ERROR: YYYY/dir is not a directory" 1>&2
exit 22
exit 24
fi
# verify that the .entry.json file is a non-empty readable file
@@ -856,19 +877,19 @@ EOF
ENTRY_JSON="$YYYY_DIR/.entry.json"
if [[ ! -e $ENTRY_JSON ]]; then
echo "$0: ERROR: .entry.json does not exist: $ENTRY_JSON" 1>&2
exit 23
exit 25
fi
if [[ ! -f $ENTRY_JSON ]]; then
echo "$0: ERROR: .entry.json is not a file: $ENTRY_JSON" 1>&2
exit 24
exit 26
fi
if [[ ! -r $ENTRY_JSON ]]; then
echo "$0: ERROR: .entry.json is not a readable file: $ENTRY_JSON" 1>&2
exit 24
exit 27
fi
if [[ ! -s $ENTRY_JSON ]]; then
echo "$0: ERROR: .entry.json is not a non-empty readable file: $ENTRY_JSON" 1>&2
exit 25
exit 28
fi
if [[ $V_FLAG -ge 7 ]]; then
echo "$0: debug[7]: .entry.json: $ENTRY_JSON" 1>&2
@@ -879,7 +900,7 @@ EOF
AWARD=$(output_award "$ENTRY_JSON")
if [[ -z $AWARD ]]; then
echo "$0: ERROR: award not found in .entry.json: $ENTRY_JSON" 1>&2
exit 27
exit 29
fi
# output the YYYY/dir entry for this author
+18 -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.1 2024-02-23"
export VERSION="1.1 2024-03-04"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -434,6 +434,16 @@ fi
exit 12
fi
# use the location tool to obtain the location common name
#
LOCATION_COMMON_NAME=$("$LOCATION_TOOL" -c "$LOCATION_CODE" 2>/dev/null)
status="$?"
if [[ $status -ne 0 ]]; then
echo "$0: ERROR: cannot determine location common name" \
"for location ISO 3166 code: $LOCATION_CODE" 1>&2
exit 13
fi
# found the number of authors at this location
#
AUTHOR_COUNT=$(find "$AUTHOR_DIR" -mindepth 1 -maxdepth 1 -type f -name '*.json' -print0 |
@@ -442,14 +452,18 @@ fi
sed -e 's/[[:space:]]*//')
if [[ -z $AUTHOR_COUNT || $AUTHOR_COUNT -le 0 ]]; then
echo "$0: ERROR: author count was zero for location: $LOCATION_CODE" 1>&2
exit 13
exit 14
fi
# output markdown entry for this location
#
echo "* <a name=$LOCATION_CODE></a>$LOCATION_CODE - $LOCATION_NAME"
if [[ $LOCATION_NAME == $LOCATION_COMMON_NAME ]]; then
echo "* <a name=$LOCATION_CODE></a>**$LOCATION_CODE** - _${LOCATION_NAME}_"
else
echo "* <a name=$LOCATION_CODE></a>**$LOCATION_CODE** - _${LOCATION_NAME}_ (_${LOCATION_COMMON_NAME}_)"
fi
echo
echo " Author count: $AUTHOR_COUNT"
echo " Author count: **$AUTHOR_COUNT**"
echo
# process each author_handle JSON files with this location in sort_word order
+38 -30
View File
@@ -59,6 +59,7 @@
<a href="../index.html">IOCCC Home</a>
<a href="../years.html">Winning Entries</a>
<a href="../authors.html">People who have won</a>
<a href="../location.html">Location of authors</a>
</div>
<hr>
<div class="sidenav">
@@ -103,11 +104,11 @@
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
<h1 id="bin">bin</h1>
<p>The directory holds <a href="README.md">bin</a> directory holds tools
that build files, such as HTML content, for the <a
<p>The directory holds <a href="index.html">bin</a> directory holds
tools that build files, such as HTML content, for the <a
href="https://www.ioccc.org">official IOCCC web site</a>.</p>
<p>For HTML content, the <a href="README.md">bin</a> directory tools
makes use of HTML fragments from the <a href="../inc/README.md">inc</a>
<p>For HTML content, the <a href="index.html">bin</a> directory tools
makes use of HTML fragments from the <a href="../inc/index.html">inc</a>
directory as well as various JSON files and other content from the <a
href="https://github.com/ioccc-src/temp-test-ioccc">IOCCC GitHub
repo</a>.</p>
@@ -146,7 +147,7 @@ href="gen-location.sh">gen-location.sh</a></h3>
<div class="sourceCode" id="cb8"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="ex">bin/gen-location.sh</span> <span class="at">-v</span> 1</span></code></pre></div>
<h3 id="gen-other-html.sh"><a
href="gen-other-html.sh">gen-other-html.sh</a></h3>
<p>Generate entry HTML files from markdown other than README.md to
<p>Generate entry HTML files from markdown other than index.html to
index.html HTML files.</p>
<p>Usage:</p>
<div class="sourceCode" id="cb9"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="ex">bin/gen-other-html.sh</span> <span class="at">-v</span> 1</span></code></pre></div>
@@ -164,12 +165,19 @@ sites.</p>
class="sourceCode sh"><code class="sourceCode bash"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="ex">bin/gen-top-html.sh</span> <span class="at">-v</span> 1</span></code></pre></div>
<p>Examples of top level HTML pages built by this tool include:</p>
<ul>
<li><a href="CODE_OF_CONDUCT.html">CODE_OF_CONDUCT.html</a></li>
<li><a href="README.html">README.html</a></li>
<li><a href="bugs.html">bugs.html</a></li>
<li><a href="contact.html">contact.html</a></li>
<li><a href="faq.html">faq.html</a></li>
<li><a href="thanks-for-help.html">thanks-for-help.html</a></li>
<li><a href="../CODE_OF_CONDUCT.html">CODE_OF_CONDUCT.html</a></li>
<li><a
href="../archive/historic/index.html">archive/historic/index.html</a></li>
<li><a href="../bin/index.html">bin/index.html</a></li>
<li><a href="../bugs.html">bugs.html</a></li>
<li><a href="../contact.html">contact.html</a></li>
<li><a href="../faq.html">faq.html</a></li>
<li><a href="../inc/index.html">inc/index.html</a></li>
<li><a href="../index.html">index.html</a></li>
<li><a href="../thanks-for-help.html">thanks-for-help.html</a></li>
<li><a href="../judges.html">judges.html</a></li>
<li><a href="../news.html">news.html</a></li>
<li><a href="../thanks-for-help.html">thanks-for-help.html</a></li>
</ul>
<h3 id="gen-year-index.sh"><a
href="gen-year-index.sh">gen-year-index.sh</a></h3>
@@ -183,15 +191,15 @@ class="sourceCode sh"><code class="sourceCode bash"><span id="cb12-1"><a href="#
<div class="sourceCode" id="cb13"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="ex">bin/gen-years.sh</span> <span class="at">-v</span> 1</span></code></pre></div>
<h3 id="ioccc-status.sh"><a href="ioccc-status">ioccc-status.sh</a></h3>
<p>Updates the <a href="/status.json">status.json</a> file.</p>
<p>Updates the <a href="../status.json">status.json</a> file.</p>
<h3 id="manifest.entry.json.awk"><a
href="manifest.entry.json.awk">manifest.entry.json.awk</a></h3>
<p>Output manifest table from a entry .entry.json file.</p>
<h3 id="md2html.sh"><a href="md2html.sh">md2html.sh</a></h3>
<p>This is the primary tool that forms IOCCC generated HTML content from
markdown files (permanent markdown files or temporarily generated
markdown files) and HTML fragments from the <a href="/inc">inc</a>
directory.</p>
markdown files) and HTML fragments from the <a
href="../inc/index.html">inc</a> directory.</p>
<p>The <a href="../inc/md2html.cfg">../inc/md2html.cfg</a> configuration
file is used by <a href="md2html.sh">md2html.sh</a> to drive the
generation process.</p>
@@ -211,11 +219,11 @@ href="pandoc-wrapper.sh">pandoc-wrapper.sh</a></h3>
href="quick-readme2index.sh">quick-readme2index.sh</a></h3>
<p>Runs <a href="readme2index.sh">readme2index.sh</a> if the entry
directory does not have a non-empty <code>index.hmtl</code> file, or if
either <code>.entry.json</code> or <code>README.md</code> is newer than
either <code>.entry.json</code> or <code>index.html</code> is newer than
the <code>index.hmtl</code> file.</p>
<p>This is useful when only a few entries have been modified (resulting
in an updated <code>.entry.json</code> file) or if the
<code>README.md</code> of a few entries have been changed.</p>
<code>index.html</code> of a few entries have been changed.</p>
<p>While the <a href="readme2index.sh">readme2index.sh</a> take a few
seconds to run, when applied to 300+ entries, the extra time can add
up.</p>
@@ -226,13 +234,13 @@ href="readme2index.sh">readme2index.sh</a> is run:</p>
class="sourceCode sh"><code class="sourceCode bash"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a><span class="ex">bin/all-run.sh</span> <span class="at">-v</span> 3 bin/quick-readme2index.sh <span class="at">-v</span> 1</span></code></pre></div>
<p><strong>NOTE</strong>: This command assumes that the relative
modification times for <code>index.hmtl</code>,
.entry.json<code>, and</code>README.md` are correct. If in doubt,
.entry.json<code>, and</code>index.html` are correct. If in doubt,
use:</p>
<div class="sourceCode" id="cb15"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a><span class="ex">bin/all-run.sh</span> <span class="at">-v</span> 3 bin/readme2index.sh <span class="at">-v</span> 1</span></code></pre></div>
<h3 id="readme2index.sh"><a
href="readme2index.sh">readme2index.sh</a></h3>
<p>Convert a entry README.md into entry directory index.html.</p>
<p>Convert a entry index.html into entry directory index.html.</p>
<h3 id="sgi.sh"><a href="sgi.sh">sgi.sh</a></h3>
<p>Sort .gitignore content from stdin to stdout.</p>
<p>We sort with lines starting with # first. We sort with lines starting
@@ -295,16 +303,16 @@ href="https://www.ioccc.org">official IOCCC web site</a>.</p>
<p>Nearly all IOCCC related HTML pages are built from markdown files,
from either permanent markdown files or temporary generated markdown
files, as well as HTML fragments from the <a
href="../inc/README.md">inc</a> directory.</p>
href="../inc/index.html">inc</a> directory.</p>
<p>Most HTML content is built from permanant markdown files, such as a
<code>README.md</code> markdown file found in each entry directory. Some
HTML content are generated from temporary markdown files. These
<code>index.html</code> markdown file found in each entry directory.
Some HTML content are generated from temporary markdown files. These
temporary markdown files are produced by tools in the <a
href="README.md">bin</a> directory and exist only while the tool is
href="index.html">bin</a> directory and exist only while the tool is
running.</p>
<p>In addition to converting markdown to HTML, the canonical way that
HTML content is built uses, by default, files from the <a
href="../inc/README.md">inc</a> directory, of the form:</p>
href="../inc/index.html">inc</a> directory, of the form:</p>
<pre><code>*.default.html</code></pre>
<p>By using command line options of the form</p>
<div class="sourceCode" id="cb24"><pre
@@ -435,18 +443,18 @@ phase numbers 20-29 (i.e., except ‘before tool’ output, pandoc wrapper
output, and except ‘after tool’ output), or command will exit non-zero,
unless -S is given. If -S is given, only a warning about un-substituted
tokens will be written to stderr.</p>
<p>The command line of tools in the <a href="README.md">bin</a>
<p>The command line of tools in the <a href="index.html">bin</a>
directory, and perhaps modified via <a href="../inc/md2html.cfg">md2html
config file</a> file may change to using a different filename for a
given phase.</p>
<p>For example when forming the HTML from
<code>2020/ferguson2/chocolate-cake.md</code>, a different “topnav”
<code>2020/ferguson2/chocolate-cake.html</code>, a different “topnav”
navigation bar is needed. So instead of the usual top navigation bar
that normally directs people to the previous entry for the year, or go
up to the year page, or to the next entry for the year, a top navigation
bar to just go up to the entry’s main page is needed. A line in the <a
href="../inc/md2html.cfg">md2html config file</a> file that refers to
<code>2020/ferguson1/chocolate-cake.md</code> may specify use of
<code>2020/ferguson1/chocolate-cake.html</code> may specify use of
<code>topnav.up2index.html</code> instead of using the
<code>topnav.default.html</code> default.</p>
<p>The HTML phase may be skipped resulting in no HTML output during a
@@ -465,7 +473,7 @@ href="https://www.ioccc.org">official IOCCC web site</a>.</p>
content on the <a
href="https://ioccc-src.github.io/temp-test-ioccc/">experimental web
site</a>.</p>
<p>… and in particular files under <a href="../inc/README.md">inc</a>
<p>… and in particular files under <a href="../inc/index.html">inc</a>
that are of the form (called default HTML files) …:</p>
<pre><code>*.default.html</code></pre>
<p>… contain default content used to form IOCCC HTML / IOCCC web
@@ -478,7 +486,7 @@ instead. That way your special case situation will not impact
<h1 id="why-do-we-do-not-use-certain-well-known-html-technologies">Why
do we do not use certain well-known HTML technologies</h1>
<p>You may wonder why we need these files in the first place. You may
wonder why we even need the tools in the <a href="README.md">bin</a>
wonder why we even need the tools in the <a href="index.html">bin</a>
directory when there other solutions available to form web pages.</p>
<h2 id="static-web-pages-only"><a name="static-only"></a>Static web
pages only</h2>
@@ -606,7 +614,7 @@ forms:</p>
in a given year.</p>
<p>NOTE: even if the directory name is not <code>anonymous</code> the
above rules apply as in in the case of <a
href="/2005/anon/anon.c">2005/anon</a>.</p>
href="../2005/anon/anon.c">2005/anon</a>.</p>
<p>Anonymous <code>author_handle</code>’s match this regexp:</p>
<pre class="re"><code>Anonymous_[0-9][0-9][0-9][0-9][.0-9]*$</code></pre>
<h2 id="entry"><code>entry</code></h2>
@@ -635,7 +643,7 @@ directory.</p>
<p>Each <code>year</code> will have a file directory under it named:</p>
<pre><code>.year</code></pre>
<p>The contents of the <code>.year</code> file is the year string of the
directory. For instance, <a href="/2020/.year">2020/.year</a> has the
directory. For instance, <a href=",,/2020/.year">2020/.year</a> has the
string: <code>2020</code>.</p>
<h2 id="dir"><code>dir</code></h2>
<p>A <code>dir</code> is a POSIX safe string that holds an entry.</p>
+43 -3
View File
@@ -55,7 +55,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.4.1 2024-02-23"
export VERSION="1.5 2024-03-04"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -561,6 +561,20 @@ if [[ ! -x $PANDOC_WRAPPER ]]; then
exit 5
fi
# find the location tool
#
LOCATION_TOOL=$(type -P location)
if [[ -z $LOCATION_TOOL ]]; then
# guess we have a location tool in bin
#
LOCATION_TOOL="$BIN_DIR/location"
fi
if [[ ! -x $LOCATION_TOOL ]]; then
echo "$0: ERROR: cannot find the location executable" 1>&2
echo "$0: notice: location tool comes from this repo: https://github.com/ioccc-src/mkiocccentry" 1>&2
exit 5
fi
# parameter debugging
#
if [[ $V_FLAG -ge 3 ]]; then
@@ -590,6 +604,7 @@ if [[ $V_FLAG -ge 3 ]]; then
echo "$0: debug[3]: DOT_YEAR=$DOT_YEAR" 1>&2
echo "$0: debug[3]: DOT_PATH=$DOT_PATH" 1>&2
echo "$0: debug[3]: ENTRY_JSON=$ENTRY_JSON" 1>&2
echo "$0: debug[3]: LOCATION_TOOL=$LOCATION_TOOL" 1>&2
fi
# Set AUTHOR_HANDLE_SET with author handles from .entry.json
@@ -745,14 +760,39 @@ for author_handle in $AUTHOR_HANDLE_SET; do
exit 13
fi
# use the location tool to obtain the location_name
#
LOCATION_NAME=$("$LOCATION_TOOL" "$LOCATION_CODE" 2>/dev/null)
status="$?"
if [[ $status -ne 0 ]]; then
echo "$0: ERROR: cannot determine location name for location ISO 3166 code: $LOCATION_CODE" 1>&2
exit 14
fi
# use the location tool to obtain the location common name
#
LOCATION_COMMON_NAME=$("$LOCATION_TOOL" -c "$LOCATION_CODE" 2>/dev/null)
status="$?"
if [[ $status -ne 0 ]]; then
echo "$0: ERROR: cannot determine location common name" \
"for location ISO 3166 code: $LOCATION_CODE" 1>&2
exit 15
fi
# write this author's information
#
{
echo "* Name: [$FULL_NAME](${DOCROOT_SLASH}authors.html#$author_handle)<br>"
if [[ $LOCATION_CODE == null ]]; then
echo "Location: [unknown](${DOCROOT_SLASH}location.html#$LOCATION_CODE)"
echo "Location: [unknown](${DOCROOT_SLASH}location.html#$LOCATION_CODE) - _${LOCATION_NAME}_"
else
echo "Location: [$LOCATION_CODE](${DOCROOT_SLASH}location.html#$LOCATION_CODE)"
if [[ $LOCATION_NAME == $LOCATION_COMMON_NAME ]]; then
echo "Location: [$LOCATION_CODE](${DOCROOT_SLASH}location.html#$LOCATION_CODE) -" \
"_${LOCATION_NAME}_"
else
echo "Location: [$LOCATION_CODE](${DOCROOT_SLASH}location.html#$LOCATION_CODE) -" \
"_${LOCATION_NAME}_ (_${LOCATION_COMMON_NAME}_)"
fi
fi
echo "<br><br>"
} | if [[ -z $NOOP ]]; then
+24 -2
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.2.2 2024-02-25"
export VERSION="1.3 2024-03-02"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -477,7 +477,7 @@ echo "KEYWORDS=IOCCC, $YEAR_DIR, IOCCC $YEAR_DIR, IOCCC entry, $ENTRY_DIR, $AWAR
echo "-s"
echo "HEADER_2=$YYYY_DIR - $AWARD"
# output topnav links
# output topnav left hand side links
#
awk -v entry_path="$YYYY_DIR" -f "$ENTRY_NAVBAR_AWK" "$DOT_YEAR"
status="$?"
@@ -486,6 +486,28 @@ if [[ $status -ne 0 ]]; then
exit 1
fi
# output topnav right hand side links
#
echo "-s"
if [[ -f $YYYY_DIR/$ENTRY_DIR.c ]]; then
echo "PROG_LINK=$REPO_URL/$YYYY_DIR/$ENTRY_DIR.c"
elif [[ -f $YYYY_DIR/prog.c ]]; then
echo "PROG_LINK=$REPO_URL/$YYYY_DIR/prog.c"
else
echo "$0: ERROR: cannot determine source code file for: $YYYY_DIR" 1>&2
exit 7
fi
echo "-s"
echo "PROG_TEXT=C code"
echo "-s"
echo "MAKEFILE_LINK=$REPO_URL/$YYYY_DIR/Makefile"
echo "-s"
echo "MAKEFILE_TEXT=Makefile"
echo "-s"
echo "INVENTORY_LINK=#inventory"
echo "-s"
echo "INVENTORY_TEXT=Inventory"
# All Done!!! -- Jessica Noll, Age 2
#
exit 0
+1 -8
View File
@@ -22,7 +22,7 @@ BEGIN {
# setup
#
VERSION="1.1 2024-01-29"
VERSION="1.2 2024-03-02"
process_next_line = 0; # 1 ==> we found our entry_path, now process the next line
found_entry_path = 0; # 1 ==> we found our entry_path
prev_line = ""; # the previous YYYY/dir line
@@ -149,13 +149,6 @@ END {
exit 210; # use 210 to match length(entry_path) == 0 error in the BEGIN section
}
# output inventory link information
#
print "-s";
print "INVENTORY_LINK=#inventory";
print "-s";
print "INVENTORY_TEXT=Inventory";
# case: we did not find our entry_path
#
if (!found_entry_path) {
+9 -2
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.0.1 2024-02-23"
export VERSION="1.1 2024-03-02"
NAME=$(basename "$0")
export NAME
export V_FLAG=0
@@ -460,7 +460,7 @@ echo "KEYWORDS=IOCCC, $YEAR_DIR, IOCCC $YEAR_DIR, IOCCC entry, The $ORDINAL IOCC
echo "-s"
echo "HEADER_2=$YEAR_DIR - The $ORDINAL IOCCC"
# output topnav links
# output topnav left hand side links
#
awk -v year_arg="$YEAR_DIR" -f "$YEAR_NAVBAR_AWK" "$TOP_FILE"
status="$?"
@@ -469,6 +469,13 @@ if [[ $status -ne 0 ]]; then
exit 1
fi
# output topnav right hand side links
#
echo "-s"
echo "INVENTORY_LINK=#inventory"
echo "-s"
echo "INVENTORY_TEXT=Inventory"
# All Done!!! -- Jessica Noll, Age 2
#
exit 0
+1 -8
View File
@@ -21,7 +21,7 @@ BEGIN {
# setup
#
VERSION="1.0 2024-02-11"
VERSION="1.1 2024-03-02"
process_next_line = 0; # 1 ==> we found our year_arg, now process the next line
found_year_arg = 0; # 1 ==> we found our year_arg
prev_line = ""; # the previous YYYY line
@@ -108,13 +108,6 @@ END {
exit 210; # use 210 to match length(year_arg) == 0 error in the BEGIN section
}
# output inventory link information
#
print "-s";
print "INVENTORY_LINK=#inventory";
print "-s";
print "INVENTORY_TEXT=Inventory";
# case: we did not find our year_arg
#
if (!found_year_arg) {