From c1b0d7de4859e969dfe29635d1cfabb7dd27a34c Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Sun, 21 Apr 2024 00:04:24 -0700 Subject: [PATCH] fix links in 1992/buzzard.2/buzzard.2.README.html MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `1992/buzzard.2/buzzard.2.README.md` has been improved so that links to files that is referenced are directed to the proper web pages (web site or GitHub). Links in `1992/buzzard.2/buzzard.2.README.md` markdown files have been changed to the generated HTML files. Changed `bin/gen-other-html.sh` VERSION from to "1.0.4 2024-04-13" to "1.1 2024-04-20". By default, we substitute _%%REPO_URL%%_ and _%%SITE_URL%%_ in inc files. Changed `bin/subst.default.sh` VERSION from to "1.2.3 2024-04-13" to "1.3 2024-04-20". All `-s TOKEN=value` substitutions are applied to all markdown files that are processed by `bin/md2html.sh`. Substitutions of and **%%TOKEN%%** are performed on included HTML content, content generated by the ‘before tool’ (-b tool), content generated by the ‘after tool’ (-a tool), as well as the markdown content given to the pandoc wrapper tool (-p tool). It is an error, unless -S is given, for any phase, except HTML phases 20-29, to not substitute all **%%TOKEN%%**'s. For HTML phases 20-29, any **%%TOKEN%%** that is not substituted are passed thru without substitution. Update `bin/index.html` to clarify Changed `bin/md2html.sh` VERSION from to "1.4 2024-04-18" to "1.5 2024-04-20". Fix the _BEFORE: 1st line of markdown file_ and _AFTER: last line of markdown file_ HTML comments so that the true markdown file source (not some temporary file) is identified. This prevents `authors.html`, `location.html` and `years.html` from always changing due to different temporary files being used on each run. Run `make www` to perform the above. --- 1992/buzzard.2/buzzard.2.README.html | 37 ++++--- 1992/buzzard.2/buzzard.2.README.md | 37 ++++--- authors.html | 4 +- bin/README.md | 152 +++++++++++++++------------ bin/gen-other-html.sh | 13 ++- bin/index.html | 145 +++++++++++++------------ bin/md2html.sh | 9 +- bin/subst.default.sh | 13 ++- location.html | 4 +- sitemap.xml | 80 +++++++------- years.html | 6 +- 11 files changed, 274 insertions(+), 226 deletions(-) diff --git a/1992/buzzard.2/buzzard.2.README.html b/1992/buzzard.2/buzzard.2.README.html index 57d91db40..64d93af15 100644 --- a/1992/buzzard.2/buzzard.2.README.html +++ b/1992/buzzard.2/buzzard.2.README.html @@ -134,27 +134,34 @@ -

buzzard.2.README.md this file
-buzzard.2.design.md description of FIRST (design documentation of THIRD)
-third implementation of THIRD in FIRST
-help.th online listing of THIRD primitives
-

+

Useful files to view

+

FIRST demos:

Use ./first < <demo>.

-

demo1.1st prints Hello World! assuming ASCII

+

THIRD demos:

Use cat third <demo> | ./first.

Demo files:

-

demo1.th prints Hello World! regardless of character set -demo2.th demonstrates a simple loop -demo3.th demonstrates a simple if test -demo4.th recursive factorial calculating on the way up -demo5.th recursive factorial calculating on the way down -demo6.th demonstrates switching from compiler to execution mode

+

Interactive THIRD:

-

Use cat third - | ./first.

-

To include the primitive on-line help, use -cat third help.th - | ./first.

+

Use:

+
cat third - | ./first
+

To include the primitive on-line help, use:

+
cat third help.th - | ./first
- +

Jump to authors starting with: [ A   @@ -2800,7 +2800,7 @@ Location: US - United States of America

- + diff --git a/bin/README.md b/bin/README.md index 89376990f..4f53f5ec2 100644 --- a/bin/README.md +++ b/bin/README.md @@ -19,13 +19,13 @@ Run a command on all winning entries. For example: ``` -bin/all-run.sh -v 3 bin/quick-readme2index.sh -v 1 + bin/all-run.sh -v 3 bin/quick-readme2index.sh -v 1 ``` Or for example: ``` -bin/all-run.sh -v 3 bin/readme2index.sh -v 1 + bin/all-run.sh -v 3 bin/readme2index.sh -v 1 ``` @@ -36,19 +36,19 @@ Run a command on all IOCCC years. For example: ``` -bin/all-years.sh -v 1 bin/gen-year-index.sh -v 1 + bin/all-years.sh -v 1 bin/gen-year-index.sh -v 1 ``` Or for example: ``` -bin/all-years.sh -v 1 bin/chk-entry.sh + bin/all-years.sh -v 1 bin/chk-entry.sh ``` We recommend that this tool be invoked via the top level `Makefile`: ``` -make verify_entry_files + make verify_entry_files ``` @@ -60,7 +60,7 @@ Check that files required by an entry match the entry's manifest as found in For example: ``` -bin/chk-entry.sh 2020/ferguson1 + bin/chk-entry.sh 2020/ferguson1 ``` @@ -71,7 +71,7 @@ Generate the list of files in the entry's manifest, `.entry.json`. For example: ``` -awk -f bin/filelist.entry.json.awk 2020/ferguson1/.entry.json + awk -f bin/filelist.entry.json.awk 2020/ferguson1/.entry.json ``` @@ -82,7 +82,7 @@ Generate the top level `/authors.html` page. Usage: ``` -bin/gen-authors.sh -v 1 + bin/gen-authors.sh -v 1 ``` @@ -93,7 +93,7 @@ Generate the top level `/location.html` page. Usage: ``` -bin/gen-location.sh -v 1 + bin/gen-location.sh -v 1 ``` @@ -105,7 +105,7 @@ files. Usage: ``` -bin/gen-other-html.sh -v 1 + bin/gen-other-html.sh -v 1 ``` @@ -116,13 +116,13 @@ Generate an XML sitemap for the IOCCC web site. Usage: ``` -bin/gen-sitemap.sh -v 1 + bin/gen-sitemap.sh -v 1 ``` We recommend that this tool be invoked via the top level `Makefile`: ``` -make gen_sitemap + make gen_sitemap ``` @@ -136,31 +136,31 @@ Without argument, the `contest_status` is unchanged. Usage: ``` -bin/gen-status.sh -v 1 + bin/gen-status.sh -v 1 ``` To force the `contest_status` to be closed: ``` -bin/gen-status.sh -v 1 closed + bin/gen-status.sh -v 1 closed ``` To force the `contest_status` to be open: ``` -bin/gen-status.sh -v 1 open + bin/gen-status.sh -v 1 open ``` To see other valid statuses: ``` -bin/gen-status -h + bin/gen-status -h ``` We recommend that this tool be invoked via the top level `Makefile`: ``` -make gen_status + make gen_status ``` @@ -171,7 +171,7 @@ Generate a number of top level HTML pages for the IOCCC web sites. Usage: ``` -bin/gen-top-html.sh -v 1 + bin/gen-top-html.sh -v 1 ``` Examples of top level HTML pages built by this tool include: @@ -192,7 +192,7 @@ Examples of top level HTML pages built by this tool include: We recommend that this tool be invoked via the top level `Makefile`: ``` -make gen_top_html + make gen_top_html ``` @@ -203,13 +203,13 @@ Generate an `index.html` page for an given IOCCC year. Usage: ``` -bin/gen-year-index.sh -v 1 2020 + bin/gen-year-index.sh -v 1 2020 ``` We recommend that this tool be invoked via the top level `Makefile`: ``` -make gen_year_index + make gen_year_index ``` @@ -220,13 +220,13 @@ Generate the top level `/years.html` page. Usage: ``` -bin/gen-years.sh -v 1 + bin/gen-years.sh -v 1 ``` We recommend that this tool be invoked via the top level `Makefile`: ``` -make gen_years + make gen_years ``` @@ -280,7 +280,7 @@ this command will only briefly pause while the slightly longer [readme2index.sh](readme2index.sh) is run: ``` -bin/all-run.sh -v 3 bin/quick-readme2index.sh -v 1 + bin/all-run.sh -v 3 bin/quick-readme2index.sh -v 1 ``` **NOTE**: This command assumes that the relative @@ -290,7 +290,7 @@ and `index.html` are correct. If in doubt, use: We recommend that this tool be invoked via the top level `Makefile`: ``` -make quick_entry_index + make quick_entry_index ``` @@ -299,19 +299,19 @@ make quick_entry_index Convert an entry README.md into entry directory index.html. ``` -bin/all-run.sh -v 3 bin/readme2index.sh -v 1 + bin/all-run.sh -v 3 bin/readme2index.sh -v 1 ``` To build `index.html` files for all entries: ``` -bin/all-run.sh -v 3 bin/readme2index.sh -v 1 + bin/all-run.sh -v 3 bin/readme2index.sh -v 1 ``` We recommend that this tool be invoked via the top level `Makefile`: ``` -make entry_index + make entry_index ``` @@ -342,19 +342,19 @@ Sort a .gitignore in a entry directory. Usage: ``` -bin/sort.gitignore.sh -v 1 YYYY/dir + bin/sort.gitignore.sh -v 1 YYYY/dir ``` Suggested usage: ``` -bin/all-run.sh bin/sort.gitignore.sh -v 1 + bin/all-run.sh bin/sort.gitignore.sh -v 1 ``` We recommend that this tool be invoked via the top level `Makefile`: ``` -make sort_gitignore + make sort_gitignore ``` @@ -430,19 +430,19 @@ Untar an entry's a compressed tarball. Usage: ``` -bin/untar-entry.sh -v 1 YYYY/dir + bin/untar-entry.sh -v 1 YYYY/dir ``` Suggested usage: ``` -bin/all-run.sh -v 3 bin/untar-entry.sh -v 1 + bin/all-run.sh -v 3 bin/untar-entry.sh -v 1 ``` We recommend that this tool be invoked via the top level `Makefile`: ``` -make untar_entry_tarball + make untar_entry_tarball ``` @@ -453,23 +453,25 @@ Untar an IOCCC year's compressed tarball. Usage: ``` -bin/untar-year.sh -v 1 YYYY + bin/untar-year.sh -v 1 YYYY ``` Suggested usage: ``` -bin/all-years.sh -v 3 bin/untar-year.sh -v 1 + bin/all-years.sh -v 3 bin/untar-year.sh -v 1 ``` We recommend that this tool be invoked via the top level `Makefile`: ``` -make untar_year_tarball + make untar_year_tarball ``` -#
How IOCCC HTML content is built
+
+# How IOCCC HTML content is built +
The [md2html.sh](md2html.sh) tool is the primary tool that is used to form all IOCCC related HTML pages for the [official IOCCC web @@ -489,20 +491,20 @@ built uses, by default, files from the [inc directory](../inc/index.html), of the file name form: ``` -*.default.html + *.default.html ``` By using command line options of the form: ``` --H phase=name + -H phase=name ``` where `phase` is the name of an HTML phase, a non-default file may be used. For example: ``` --H navbar=up2index + -H navbar=up2index ``` will cause [inc/navbar.up2index.html](../inc/navbar.up2index.html) @@ -513,14 +515,16 @@ If `name` is dot (i.e., `.`), then the given HTML phase is skipped. For example: ``` --H footer=. + -H footer=. ``` will cause no HTML content to be produced during the `footer` HTML phase. -##
HTML phases
+
+## HTML phases +
The following HTML phase files are used to build HTML content: @@ -546,18 +550,24 @@ Phases 23-29 are reserved for future use. Phases 33-39 are reserved for future use. -In the above HTML phase numbers, except during HTML phase numbers 20-29, symbols -of the form `%%TOKEN%%` are substituted. +In all of the above HTML phase numbers, symbols of the form **%%TOKEN%%** are substituted. -Any `%%TOKEN%%` printed by the 'before tool' (`-b tool`), the 'pandoc wrapper -tool' (`-p tool`), and the 'after tool' (`-a tool`) are ignored (i.e., not -substituted). +Substitutions of and **%%TOKEN%%** are performed on included HTML content, +content generated by the 'before tool' (`-b tool`), +content generated by the 'after tool' (`-a tool`), +as well as the markdown content given to the `pandoc wrapper tool` (`-p tool`). + +It is an error, unless `-S` is given, for any phase, except phases HTML +20-29, to not substitute all **%%TOKEN%%**'s. For phases HTML 20-29, any +**%%TOKEN%%** that is not substituted are passed thru without substitution. See the tool [readme2index.sh](readme2index.sh) for an example of how HTML phases are implemented. -##
`getopt` phase processing of the command line
+
+## getopt phase processing of the command line +
The command options are evaluated in the following `getopt` phases: @@ -625,16 +635,16 @@ IMPORTANT: An "output tool" will print each command line option / argument on a So for example, if an "output tool" wishes to convey: ``` --s TITLE='IOCCC entry locations' -H navbar=top-of-site + -s TITLE='IOCCC entry locations' -H navbar=top-of-site ``` The "output tool" would output the following 4 lines: ``` --s -TITLE='IOCCC entry locations' --H -navbar=top-of-site + -s + TITLE='IOCCC entry locations' + -H + navbar=top-of-site ``` The command line options printed by an "output tool" are processed @@ -645,7 +655,7 @@ on the command line. For example: ``` -command [command_options ..] [cfg_options ..] [output_tool_options ..] [--] [filename_arg ..] + command [command_options ..] [cfg_options ..] [output_tool_options ..] [--] [filename_arg ..] ``` Here the `command` first processes any command line options, then it processes @@ -709,7 +719,7 @@ on the [experimental web site](https://ioccc-src.github.io/temp-test-ioccc/). (called default HTML files) ...: ``` -*.default.html + *.default.html ``` ... contain default content used to form IOCCC HTML / IOCCC web pages. @@ -727,7 +737,9 @@ we even need the tools in the [bin](index.html) directory when there other solutions available to form web pages. -##
Static web pages only
+
+## Static web pages only +
Here are some reasons why we are using these files and special tools to create HTML content / IOCCC web pages: @@ -752,7 +764,9 @@ We use [static web pages](#static-only), so use of a "back-end database" is not available to the IOCCC. -##
We cannot use non-GitHub web servers
+
+## We cannot use non-GitHub web servers +
The [GitHub pages](https://pages.github.com) have the distributed server capacity needed to handle the **huge download volume** or [Slashdot effect](https://en.wikipedia.org/wiki/Slashdot_effect) @@ -823,7 +837,9 @@ site](https://www.ioccc.org). For this reason, we cannot use JavaScript include HTML content. -#
IOCCC terms
+
+# IOCCC terms +
The following IOCCC terms apply to tools, JSON files, and the directory structure of this repo. @@ -845,7 +861,7 @@ IOCCC. Each author has **EXACTLY ONE** `author_handle`. For each `author_handle`, there will be a JSON file located at: ``` -author/author_handle.json + author/author_handle.json ``` where `author_handle` is the author's `author_handle`. @@ -856,7 +872,7 @@ document). In particular, the `author_handle` must be an ASCII string that matches this regexp: ``` -^[0-9A-Za-z][0-9A-Za-z._+-]*$" + ^[0-9A-Za-z][0-9A-Za-z._+-]*$" ``` Default `author_handle`'s do not have multiple consecutive `_` (underscore) @@ -876,13 +892,13 @@ author. For an anonymous `author`, their handle is one of these forms: ``` -Anonymous_year + Anonymous_year ``` or: ``` -Anonymous_year.digits + Anonymous_year.digits ``` @@ -895,7 +911,7 @@ in the case of [2005/anon](../2005/anon/anon.c). Anonymous `author_handle`'s match this regexp: ``` -Anonymous_[0-9][0-9][0-9][0-9][.0-9]*$ + Anonymous_[0-9][0-9][0-9][0-9][.0-9]*$ ``` @@ -927,7 +943,7 @@ Non-numeric `year` strings are lower case. A `year` string matches this regexp: ``` -[0-9a-z][0-9a-z][0-9a-z][0-9a-z] + [0-9a-z][0-9a-z][0-9a-z][0-9a-z] ``` The `year` directories reside directly below the top level directory. @@ -938,7 +954,7 @@ The `year` directories reside directly below the top level directory. Each `year` directory will have a file under it named: ``` -.year + .year ``` The contents of the `.year` file is the year string of the directory. For @@ -952,7 +968,7 @@ A `dir` is a POSIX safe string that holds an entry. A `dir` is a string that matches this regexp: ``` -^[a-z][0-9a-z.-]*$ + ^[a-z][0-9a-z.-]*$ ``` Each `entry` is under its own individual directory. This directory @@ -964,7 +980,7 @@ is directly under a `year` directory. A string that identifies the winning entry. The string is of the form: ``` -year_dir + year_dir ``` diff --git a/bin/gen-other-html.sh b/bin/gen-other-html.sh index 9d4b2d4cb..184262007 100755 --- a/bin/gen-other-html.sh +++ b/bin/gen-other-html.sh @@ -84,7 +84,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.4 2024-04-13" +export VERSION="1.1 2024-04-20" NAME=$(basename "$0") export NAME export V_FLAG=0 @@ -221,12 +221,8 @@ while getopts :hv:Vd:D:nNt:T:p:u:w: flag; do TOOL_OPTION+=("$PANDOC_WRAPPER") ;; u) REPO_URL="$OPTARG" - TOOL_OPTION+=("-u") - TOOL_OPTION+=("$REPO_URL") ;; w) SITE_URL="$OPTARG" - TOOL_OPTION+=("-w") - TOOL_OPTION+=("$SITE_URL") ;; \?) echo "$0: ERROR: invalid option: -$OPTARG" 1>&2 echo 1>&2 @@ -342,6 +338,10 @@ fi # TOOL_OPTION+=("-t") TOOL_OPTION+=("$TAGLINE") +TOOL_OPTION+=("-u") +TOOL_OPTION+=("$REPO_URL") +TOOL_OPTION+=("-w") +TOOL_OPTION+=("$SITE_URL") # print running info if verbose # @@ -631,17 +631,20 @@ for YYYY in $(< "$TOP_FILE"); do if [[ $V_FLAG -ge 3 ]]; then echo "$0: debug[3]: about to run: $MD2HTML_SH ${TOOL_OPTION[*]}" \ "-s $DESCRIPTION -s $KEYWORDS -s $HEADER_2" \ + "-s REPO_URL=$REPO_URL -s SITE_URL=$SITE_URL" \ "-s $UP_LINK -s $UP_TEXT -D $D_OPTION -m $MD_FILE -v $V_FLAG --" \ "$MD_FILE $HTML_FLLE" 1>&2 fi "$MD2HTML_SH" "${TOOL_OPTION[@]}" \ -s "$DESCRIPTION" -s "$KEYWORDS" -s "$HEADER_2" \ + -s "REPO_URL=$REPO_URL" -s "SITE_URL=$SITE_URL" \ -s "$UP_LINK" -s "$UP_TEXT" -D "$D_OPTION" -m "$MD_FILE" -v "$V_FLAG" -- \ "$MD_FILE" "$HTML_FLLE" status="$?" if [[ $status -ne 0 ]]; then echo "$0: ERROR: tool: $MD2HTML_SH ${TOOL_OPTION[*]}" \ "-s $DESCRIPTION -s $KEYWORDS -s $HEADER_2" \ + "-s REPO_URL=$REPO_URL -s SITE_URL=$SITE_URL" \ "-s $UP_LINK -s $UP_TEXT -D $D_OPTION -m $MD_FILE -v $V_FLAG --" \ "$MD_FILE $HTML_FLLE failed, error: $status" 1>&2 echo 1 > "$TMP_EXIT_CODE" # exit 1 diff --git a/bin/index.html b/bin/index.html index 559939253..8c66da68d 100644 --- a/bin/index.html +++ b/bin/index.html @@ -144,63 +144,63 @@ repo.

all-run.sh

Run a command on all winning entries.

For example:

-
bin/all-run.sh -v 3 bin/quick-readme2index.sh -v 1
+
    bin/all-run.sh -v 3 bin/quick-readme2index.sh -v 1

Or for example:

-
bin/all-run.sh -v 3 bin/readme2index.sh -v 1
+
    bin/all-run.sh -v 3 bin/readme2index.sh -v 1

all-years.sh

Run a command on all IOCCC years.

For example:

-
bin/all-years.sh -v 1 bin/gen-year-index.sh -v 1
+
    bin/all-years.sh -v 1 bin/gen-year-index.sh -v 1

Or for example:

-
bin/all-years.sh -v 1 bin/chk-entry.sh
+
    bin/all-years.sh -v 1 bin/chk-entry.sh

We recommend that this tool be invoked via the top level Makefile:

-
make verify_entry_files
+
    make verify_entry_files

chk-entry.sh

Check that files required by an entry match the entry’s manifest as found in .entry.json.

For example:

-
bin/chk-entry.sh 2020/ferguson1
+
    bin/chk-entry.sh 2020/ferguson1

filelist.entry.json.awk

Generate the list of files in the entry’s manifest, .entry.json.

For example:

-
awk -f bin/filelist.entry.json.awk 2020/ferguson1/.entry.json
+
    awk -f bin/filelist.entry.json.awk 2020/ferguson1/.entry.json

gen-authors.sh

Generate the top level /authors.html page.

Usage:

-
bin/gen-authors.sh -v 1
+
    bin/gen-authors.sh -v 1

gen-location.sh

Generate the top level /location.html page.

Usage:

-
bin/gen-location.sh -v 1
+
    bin/gen-location.sh -v 1

gen-other-html.sh

Generate entry HTML files (other than README.md to index.html) from markdown files.

Usage:

-
bin/gen-other-html.sh -v 1
+
    bin/gen-other-html.sh -v 1

gen-sitemap.sh

Generate an XML sitemap for the IOCCC web site.

Usage:

-
bin/gen-sitemap.sh -v 1
+
    bin/gen-sitemap.sh -v 1

We recommend that this tool be invoked via the top level Makefile:

-
make gen_sitemap
+
    make gen_sitemap

gen-status.sh

Generate status.json according to the modification dates of status.json and news.html.

Without argument, the contest_status is unchanged.

Usage:

-
bin/gen-status.sh -v 1
+
    bin/gen-status.sh -v 1

To force the contest_status to be closed:

-
bin/gen-status.sh -v 1 closed
+
    bin/gen-status.sh -v 1 closed

To force the contest_status to be open:

-
bin/gen-status.sh -v 1 open
+
    bin/gen-status.sh -v 1 open

To see other valid statuses:

-
bin/gen-status -h
+
    bin/gen-status -h

We recommend that this tool be invoked via the top level Makefile:

-
make gen_status
+
    make gen_status

gen-top-html.sh

Generate a number of top level HTML pages for the IOCCC web sites.

Usage:

-
bin/gen-top-html.sh -v 1
+
    bin/gen-top-html.sh -v 1

Examples of top level HTML pages built by this tool include:

We recommend that this tool be invoked via the top level Makefile:

-
make gen_top_html
+
    make gen_top_html

gen-year-index.sh

Generate an index.html page for an given IOCCC year.

Usage:

-
bin/gen-year-index.sh -v 1 2020
+
    bin/gen-year-index.sh -v 1 2020

We recommend that this tool be invoked via the top level Makefile:

-
make gen_year_index
+
    make gen_year_index

gen-years.sh

Generate the top level /years.html page.

Usage:

-
bin/gen-years.sh -v 1
+
    bin/gen-years.sh -v 1

We recommend that this tool be invoked via the top level Makefile:

-
make gen_years
+
    make gen_years

md2html.sh

This is the primary tool that forms IOCCC generated HTML content from markdown files (permanent markdown files or temporarily generated @@ -258,19 +258,19 @@ the extra time can add up.

If only a few index.hmtl files need updating, then this command will only briefly pause while the slightly longer readme2index.sh is run:

-
bin/all-run.sh -v 3 bin/quick-readme2index.sh -v 1
+
    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 index.html are correct. If in doubt, use:

We recommend that this tool be invoked via the top level Makefile:

-
make quick_entry_index
+
    make quick_entry_index

readme2index.sh

Convert an entry README.md into entry directory index.html.

-
bin/all-run.sh -v 3 bin/readme2index.sh -v 1
+
    bin/all-run.sh -v 3 bin/readme2index.sh -v 1

To build index.html files for all entries:

-
bin/all-run.sh -v 3 bin/readme2index.sh -v 1
+
    bin/all-run.sh -v 3 bin/readme2index.sh -v 1

We recommend that this tool be invoked via the top level Makefile:

-
make entry_index
+
    make entry_index

status2html.sh

Convert status.json into HTML.

This tool is a ‘before tool’ (-b tool) that is intended @@ -285,11 +285,11 @@ We sort with lines starting with ! fourth.

sort.gitignore.sh

Sort a .gitignore in a entry directory.

Usage:

-
bin/sort.gitignore.sh -v 1 YYYY/dir
+
    bin/sort.gitignore.sh -v 1 YYYY/dir

Suggested usage:

-
bin/all-run.sh bin/sort.gitignore.sh -v 1
+
    bin/all-run.sh bin/sort.gitignore.sh -v 1

We recommend that this tool be invoked via the top level Makefile:

-
make sort_gitignore
+
    make sort_gitignore

subst.default.sh

Print default substitutions.

subst.entry-index.sh

@@ -317,22 +317,21 @@ We sort with lines starting with ! fourth.

untar-entry.sh

Untar an entry’s a compressed tarball.

Usage:

-
bin/untar-entry.sh -v 1 YYYY/dir
+
    bin/untar-entry.sh -v 1 YYYY/dir

Suggested usage:

-
bin/all-run.sh -v 3 bin/untar-entry.sh -v 1
+
    bin/all-run.sh -v 3 bin/untar-entry.sh -v 1

We recommend that this tool be invoked via the top level Makefile:

-
make untar_entry_tarball
+
    make untar_entry_tarball

untar-year.sh

Untar an IOCCC year’s compressed tarball.

Usage:

-
bin/untar-year.sh -v 1 YYYY
+
    bin/untar-year.sh -v 1 YYYY

Suggested usage:

-
bin/all-years.sh -v 3 bin/untar-year.sh -v 1
+
    bin/all-years.sh -v 3 bin/untar-year.sh -v 1

We recommend that this tool be invoked via the top level Makefile:

-
make untar_year_tarball
-# +
    make untar_year_tarball
-How IOCCC HTML content is built +

How IOCCC HTML content is built

The md2html.sh tool is the primary tool that is used to form all IOCCC related HTML pages for the official IOCCC web @@ -347,22 +346,21 @@ tools in the bin directory and exist only while the too

In addition to converting markdown to HTML, the canonical way that HTML content is built uses, by default, files from the inc directory, of the file name form:

-
*.default.html
+
    *.default.html

By using command line options of the form:

-
-H phase=name
+
    -H phase=name

where phase is the name of an HTML phase, a non-default file may be used. For example:

-
-H navbar=up2index
+
    -H navbar=up2index

will cause inc/navbar.up2index.html instead of inc/navbar.default.html to be used during the navbar HTML phase.

If name is dot (i.e., .), then the given HTML phase is skipped. For example:

-
-H footer=.
+
    -H footer=.

will cause no HTML content to be produced during the footer HTML phase.

-##
-HTML phases +

HTML phases

The following HTML phase files are used to build HTML content:

    @@ -387,16 +385,18 @@ HTML phases
  1. inc/bottom.default.html

Phases 33-39 are reserved for future use.

-

In the above HTML phase numbers, except during HTML phase numbers 20-29, symbols -of the form %%TOKEN%% are substituted.

-

Any %%TOKEN%% printed by the ‘before tool’ (-b tool), the ‘pandoc wrapper -tool’ (-p tool), and the ‘after tool’ (-a tool) are ignored (i.e., not -substituted).

+

In all of the above HTML phase numbers, symbols of the form %%TOKEN%% are substituted.

+

Substitutions of and %%TOKEN%% are performed on included HTML content, +content generated by the ‘before tool’ (-b tool), +content generated by the ‘after tool’ (-a tool), +as well as the markdown content given to the pandoc wrapper tool (-p tool).

+

It is an error, unless -S is given, for any phase, except phases HTML +20-29, to not substitute all %%TOKEN%%’s. For phases HTML 20-29, any +%%TOKEN%% that is not substituted are passed thru without substitution.

See the tool readme2index.sh for an example of how HTML phases are implemented.

-##
-getopt phase processing of the command line +

getopt phase processing of the command line

The command options are evaluated in the following getopt phases:

getopt phase 0

@@ -430,18 +430,18 @@ the same token only.

An “output tool” may be used to add certain additional command line options to be processed.

IMPORTANT: An “output tool” will print each command line option / argument on a separate line. So for example, if an “output tool” wishes to convey:

-
-s TITLE='IOCCC entry locations' -H navbar=top-of-site
+
    -s TITLE='IOCCC entry locations' -H navbar=top-of-site

The “output tool” would output the following 4 lines:

-
-s
-TITLE='IOCCC entry locations'
--H
-navbar=top-of-site
+
    -s
+    TITLE='IOCCC entry locations'
+    -H
+    navbar=top-of-site

The command line options printed by an “output tool” are processed after all command line options, and all options from a matching line from the md2html.cfg file, and before any filename arguments on the command line.

For example:

-
command [command_options ..] [cfg_options ..] [output_tool_options ..] [--] [filename_arg ..]
+
    command [command_options ..] [cfg_options ..] [output_tool_options ..] [--] [filename_arg ..]

Here the command first processes any command line options, then it processes cfg_options obtained from this file from a first match of a given file_glob, then it processes output tool (i.e., -o tool) options found in @@ -486,7 +486,7 @@ on the official IOCCC web site.

on the experimental web site.

… and in particular files under inc that are of the form (called default HTML files) …:

-
*.default.html
+
    *.default.html

… contain default content used to form IOCCC HTML / IOCCC web pages.

Instead of editing the default HTML files in order to fix a special web page, consider making a copy of the default file and modifying the md2html config @@ -496,9 +496,8 @@ situation will not impact MOST of the HTML content.

You may wonder why we need these files in the first place. You may wonder why we even need the tools in the bin directory when there other solutions available to form web pages.

-##
-Static web pages only +

Static web pages only

Here are some reasons why we are using these files and special tools to create HTML content / IOCCC web pages:

@@ -513,9 +512,8 @@ pages.

We cannot use a back-end database

We use static web pages, so use of a “back-end database” is not available to the IOCCC.

-##
-We cannot use non-GitHub web servers +

We cannot use non-GitHub web servers

The GitHub pages have the distributed server capacity needed to handle the huge download volume or Slashdot effect @@ -563,9 +561,8 @@ disabled.

The IOCCC will NOT MANDATE USE OF JavaScript to view official IOCCC web site.

For this reason, we cannot use JavaScript include HTML content.

-#
-IOCCC terms +

IOCCC terms

The following IOCCC terms apply to tools, JSON files, and the directory structure of this repo.

author

@@ -577,13 +574,13 @@ IOCCC entries have more than one author. In that case we might use the word

An author_handle is string that refers to a given author and is unique to the IOCCC. Each author has EXACTLY ONE author_handle.

For each author_handle, there will be a JSON file located at:

-
author/author_handle.json
+
    author/author_handle.json

where author_handle is the author’s author_handle.

Because the author_handle is used to form a JSON filename, the string must be a POSIX safe string with the addition of + (for technical reasons beyond this document). In particular, the author_handle must be an ASCII string that matches this regexp:

-
^[0-9A-Za-z][0-9A-Za-z._+-]*$"
+
    ^[0-9A-Za-z][0-9A-Za-z._+-]*$"

Default author_handle’s do not have multiple consecutive _ (underscore) characters. Nevertheless, multiple consecutive _ (underscore) characters are allowed. Contest submitters who wish to override the author_handle may do so.

@@ -596,15 +593,15 @@ desire.

author_handle so that new winning entries can be associated with the same author.

For an anonymous author, their handle is one of these forms:

-
Anonymous_year
+
    Anonymous_year

or:

-
Anonymous_year.digits
+
    Anonymous_year.digits

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.

Anonymous author_handle’s match this regexp:

-
Anonymous_[0-9][0-9][0-9][0-9][.0-9]*$
+
    Anonymous_[0-9][0-9][0-9][0-9][.0-9]*$

entry

An IOCCC entry that won an award for a given IOCCC.

An entry has one more more authors.

@@ -621,22 +618,22 @@ may be limited to previous entrys that used them.

represent the year. Some special year strings are possible, such as mock. Non-numeric year strings are lower case.

A year string matches this regexp:

-
[0-9a-z][0-9a-z][0-9a-z][0-9a-z]
+
    [0-9a-z][0-9a-z][0-9a-z][0-9a-z]

The year directories reside directly below the top level directory.

.year

Each year directory will have a file under it named:

-
.year
+
    .year

The contents of the .year file is the year string of the directory. For instance, 2020/.year has the string: 2020.

dir

A dir is a POSIX safe string that holds an entry.

A dir is a string that matches this regexp:

-
^[a-z][0-9a-z.-]*$
+
    ^[a-z][0-9a-z.-]*$

Each entry is under its own individual directory. This directory is directly under a year directory.

entry_id

A string that identifies the winning entry. The string is of the form:

-
year_dir
+
    year_dir
" > "$TMP_STRIPPED_MD" + # perform the %%TOKEN%% substitutions markdown file AND # strip commented language after markdown code block # # We do not want the sed extended regular expression to be expanded, so @@ -1759,10 +1760,10 @@ if [[ -z $NOOP ]]; then # 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" + sed -E -e 's/^```[[:space:]]/```/' -f "$TMP_SED_SCRIPT" "$INPUT_MD" >> "$TMP_STRIPPED_MD" status="$?" if [[ $status -ne 0 ]]; then - echo "$0: ERROR: strip commented language after markdown code block from $INPUT_MD into file:" \ + echo "$0: ERROR: token substation and strip code block command language from $INPUT_MD into file:" \ "$TMP_INPUT_MD failed, error code: $status" 1>&2 exit 25 fi diff --git a/bin/subst.default.sh b/bin/subst.default.sh index 53b21d64d..7b42e91b5 100755 --- a/bin/subst.default.sh +++ b/bin/subst.default.sh @@ -92,7 +92,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.3 2024-04-13" +export VERSION="1.3 2024-04-20" NAME=$(basename "$0") export NAME export V_FLAG=0 @@ -260,6 +260,16 @@ fi echo "-s" echo "HEADER_1=The International Obfuscated C Code Contest" +# output REPO_URL substitution +# +echo "-s" +echo "REPO_URL=$REPO_URL" + +# output SITE_URL substitution +# +echo "-s" +echo "SITE_URL=$SITE_URL" + # output DOCROOT_SLASH substitution # echo "-s" @@ -271,6 +281,7 @@ export VALIDATOR_ENCODED_URL echo "-s" echo "VALIDATOR_ENCODED_URL=$VALIDATOR_ENCODED_URL" + # All Done!!! -- Jessica Noll, Age 2 # exit 0 diff --git a/location.html b/location.html index 089718175..d6c4e2d2f 100644 --- a/location.html +++ b/location.html @@ -132,7 +132,7 @@ - + - + diff --git a/sitemap.xml b/sitemap.xml index fcb16db51..c263f03e1 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -3158,11 +3158,11 @@ https://ioccc-src.github.io/temp-test-ioccc/1992/buzzard.2/buzzard.2.README.html - 2024-04-19T08:14:05+00:00 + 2024-04-21T06:04:43+00:00 https://ioccc-src.github.io/temp-test-ioccc/1992/buzzard.2/buzzard.2.README.md - 2024-04-12T18:22:04+00:00 + 2024-04-21T06:04:40+00:00 https://ioccc-src.github.io/temp-test-ioccc/1992/buzzard.2/demo1.1st @@ -7826,7 +7826,7 @@ https://ioccc-src.github.io/temp-test-ioccc/2004/anonymous/.entry.json - 2024-04-16T18:02:26+00:00 + 2024-04-20T21:38:41+00:00 https://ioccc-src.github.io/temp-test-ioccc/2004/anonymous/.gitignore @@ -7834,11 +7834,15 @@ https://ioccc-src.github.io/temp-test-ioccc/2004/anonymous/index.html - 2024-04-19T08:15:41+00:00 + 2024-04-21T03:58:57+00:00 https://ioccc-src.github.io/temp-test-ioccc/2004/anonymous/Makefile - 2024-03-23T07:10:42+00:00 + 2024-04-21T03:56:15+00:00 + + + https://ioccc-src.github.io/temp-test-ioccc/2004/anonymous/One_Ring_inscription.png + 2024-04-20T21:47:08+00:00 https://ioccc-src.github.io/temp-test-ioccc/2004/anonymous/.path @@ -7846,7 +7850,7 @@ https://ioccc-src.github.io/temp-test-ioccc/2004/anonymous/README.md - 2024-04-17T07:31:20+00:00 + 2024-04-20T21:47:22+00:00 https://ioccc-src.github.io/temp-test-ioccc/2004/anonymous/try.sh @@ -8290,7 +8294,7 @@ https://ioccc-src.github.io/temp-test-ioccc/2004/index.html - 2024-04-19T08:13:59+00:00 + 2024-04-20T21:00:59+00:00 https://ioccc-src.github.io/temp-test-ioccc/2004/jdalbec/2004_jdalbec.tar.bz2 @@ -8874,7 +8878,7 @@ https://ioccc-src.github.io/temp-test-ioccc/2005/boutines/index.html - 2024-04-19T08:15:50+00:00 + 2024-04-21T04:19:45+00:00 https://ioccc-src.github.io/temp-test-ioccc/2005/boutines/input.txt @@ -8890,7 +8894,7 @@ https://ioccc-src.github.io/temp-test-ioccc/2005/boutines/README.md - 2024-04-17T07:32:28+00:00 + 2024-04-21T04:16:36+00:00 https://ioccc-src.github.io/temp-test-ioccc/2005/boutines/try.sh @@ -10850,7 +10854,7 @@ https://ioccc-src.github.io/temp-test-ioccc/2011/goren/index.html - 2024-04-19T08:16:06+00:00 + 2024-04-21T03:59:24+00:00 https://ioccc-src.github.io/temp-test-ioccc/2011/goren/MagrittePipe.jpg @@ -10866,7 +10870,7 @@ https://ioccc-src.github.io/temp-test-ioccc/2011/goren/README.md - 2024-04-12T18:22:04+00:00 + 2024-04-20T22:23:44+00:00 https://ioccc-src.github.io/temp-test-ioccc/2011/goren/try.sh @@ -12082,7 +12086,7 @@ https://ioccc-src.github.io/temp-test-ioccc/2012/vik/index.html - 2024-04-19T08:16:17+00:00 + 2024-04-20T22:29:15+00:00 https://ioccc-src.github.io/temp-test-ioccc/2012/vik/ioccc.png @@ -12098,7 +12102,7 @@ https://ioccc-src.github.io/temp-test-ioccc/2012/vik/README.md - 2024-04-12T18:22:04+00:00 + 2024-04-20T22:30:12+00:00 https://ioccc-src.github.io/temp-test-ioccc/2012/vik/try.sh @@ -12286,7 +12290,7 @@ https://ioccc-src.github.io/temp-test-ioccc/2013/birken/index.html - 2024-04-19T08:16:18+00:00 + 2024-04-21T03:59:35+00:00 https://ioccc-src.github.io/temp-test-ioccc/2013/birken/ioccc.txt @@ -12398,7 +12402,7 @@ https://ioccc-src.github.io/temp-test-ioccc/2013/birken/README.md - 2024-04-17T06:59:26+00:00 + 2024-04-21T03:36:52+00:00 https://ioccc-src.github.io/temp-test-ioccc/2013/birken/rhino.txt @@ -12466,7 +12470,7 @@ https://ioccc-src.github.io/temp-test-ioccc/2013/cable1/index.html - 2024-04-19T08:16:19+00:00 + 2024-04-21T04:39:27+00:00 https://ioccc-src.github.io/temp-test-ioccc/2013/cable1/Makefile @@ -12478,7 +12482,7 @@ https://ioccc-src.github.io/temp-test-ioccc/2013/cable1/README.md - 2024-04-12T18:22:04+00:00 + 2024-04-21T04:39:02+00:00 https://ioccc-src.github.io/temp-test-ioccc/2013/cable1/try.sh @@ -12594,7 +12598,7 @@ https://ioccc-src.github.io/temp-test-ioccc/2013/cable3/index.html - 2024-04-19T08:16:20+00:00 + 2024-04-21T03:59:37+00:00 https://ioccc-src.github.io/temp-test-ioccc/2013/cable3/Makefile @@ -12606,7 +12610,7 @@ https://ioccc-src.github.io/temp-test-ioccc/2013/cable3/README.md - 2024-04-12T18:22:04+00:00 + 2024-04-21T03:49:01+00:00 https://ioccc-src.github.io/temp-test-ioccc/2013/cable3/sc-ioccc.terminal @@ -13510,11 +13514,11 @@ https://ioccc-src.github.io/temp-test-ioccc/2013/hou/doc/example.html - 2024-04-19T08:14:07+00:00 + 2024-04-21T04:28:50+00:00 https://ioccc-src.github.io/temp-test-ioccc/2013/hou/doc/example.md - 2024-04-19T00:43:37+00:00 + 2024-04-21T04:27:20+00:00 https://ioccc-src.github.io/temp-test-ioccc/2013/hou/.entry.json @@ -13534,7 +13538,7 @@ https://ioccc-src.github.io/temp-test-ioccc/2013/hou/index.html - 2024-04-19T08:16:23+00:00 + 2024-04-21T04:35:24+00:00 https://ioccc-src.github.io/temp-test-ioccc/2013/hou/luna.jpg @@ -13566,7 +13570,7 @@ https://ioccc-src.github.io/temp-test-ioccc/2013/hou/README.md - 2024-04-19T00:37:17+00:00 + 2024-04-21T04:35:13+00:00 https://ioccc-src.github.io/temp-test-ioccc/2013/hou/try.sh @@ -17466,11 +17470,11 @@ https://ioccc-src.github.io/temp-test-ioccc/2020/ferguson1/chocolate-cake.html - 2024-04-19T08:14:10+00:00 + 2024-04-21T04:31:32+00:00 https://ioccc-src.github.io/temp-test-ioccc/2020/ferguson1/chocolate-cake.md - 2024-04-12T18:22:04+00:00 + 2024-04-21T04:31:12+00:00 https://ioccc-src.github.io/temp-test-ioccc/2020/ferguson1/COMPILING.html @@ -18942,7 +18946,7 @@ https://ioccc-src.github.io/temp-test-ioccc/authors.html - 2024-04-19T08:36:03+00:00 + 2024-04-21T06:47:18+00:00 https://ioccc-src.github.io/temp-test-ioccc/author/Sjoerd_Mullender.json @@ -19082,7 +19086,7 @@ https://ioccc-src.github.io/temp-test-ioccc/bin/gen-other-html.sh - 2024-04-16T19:14:55+00:00 + 2024-04-21T05:40:59+00:00 https://ioccc-src.github.io/temp-test-ioccc/bin/gen-sitemap.sh @@ -19106,7 +19110,7 @@ https://ioccc-src.github.io/temp-test-ioccc/bin/index.html - 2024-04-19T08:14:13+00:00 + 2024-04-21T06:40:41+00:00 https://ioccc-src.github.io/temp-test-ioccc/bin/manifest.entry.json.awk @@ -19114,7 +19118,7 @@ https://ioccc-src.github.io/temp-test-ioccc/bin/md2html.sh - 2024-04-19T08:03:32+00:00 + 2024-04-21T06:46:26+00:00 https://ioccc-src.github.io/temp-test-ioccc/bin/output-index-author.sh @@ -19142,7 +19146,7 @@ https://ioccc-src.github.io/temp-test-ioccc/bin/README.md - 2024-04-16T23:12:22+00:00 + 2024-04-21T06:40:32+00:00 https://ioccc-src.github.io/temp-test-ioccc/bin/sgi.sh @@ -19158,7 +19162,7 @@ https://ioccc-src.github.io/temp-test-ioccc/bin/subst.default.sh - 2024-04-16T19:14:55+00:00 + 2024-04-21T05:17:54+00:00 https://ioccc-src.github.io/temp-test-ioccc/bin/subst.entry-index.sh @@ -19210,19 +19214,19 @@ https://ioccc-src.github.io/temp-test-ioccc/contact.html - 2024-04-19T08:14:14+00:00 + 2024-04-20T20:35:51+00:00 https://ioccc-src.github.io/temp-test-ioccc/contact.md - 2024-04-17T06:00:03+00:00 + 2024-04-20T20:35:51+00:00 https://ioccc-src.github.io/temp-test-ioccc/faq.html - 2024-04-19T08:14:14+00:00 + 2024-04-20T20:35:51+00:00 https://ioccc-src.github.io/temp-test-ioccc/faq.md - 2024-04-19T05:37:43+00:00 + 2024-04-20T20:35:51+00:00 https://ioccc-src.github.io/temp-test-ioccc/.gitignore @@ -19310,7 +19314,7 @@ https://ioccc-src.github.io/temp-test-ioccc/inc/md2html.cfg - 2024-04-16T19:14:55+00:00 + 2024-04-21T05:39:44+00:00 https://ioccc-src.github.io/temp-test-ioccc/inc/navbar.default.html @@ -19410,7 +19414,7 @@ https://ioccc-src.github.io/temp-test-ioccc/location.html - 2024-04-19T08:36:05+00:00 + 2024-04-21T06:47:31+00:00 https://ioccc-src.github.io/temp-test-ioccc/Makefile @@ -19462,6 +19466,6 @@ https://ioccc-src.github.io/temp-test-ioccc/years.html - 2024-04-19T08:36:06+00:00 + 2024-04-21T06:48:01+00:00 diff --git a/years.html b/years.html index abcc03916..1a1a2877f 100644 --- a/years.html +++ b/years.html @@ -132,7 +132,7 @@ - +

IOCCC Winning Entries by Year

Jump to:

2020 | 2019 | 2018 | 2015 | 2014 | 2013 | 2012 | 2011

@@ -367,7 +367,7 @@ Download all 2004 IOCCC entry source

 Jump to: top

- +