From 9787cc3a120b0212ab609b3ed4d4bb41e4c22877 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Wed, 6 Nov 2024 10:11:50 -0800 Subject: [PATCH] Fix html.sed and related scripts The file bin/html.sed has been fixed so that it works with bin/md2html.sh (which has been modified and which is used via bin/subst.entry-index.sh and output-index-inventory.sh). The script output-index-inventory.sh was already updated to use html.sed so this file has not been modified but the md2html.sh and subst.entry-index.sh scripts have, along with bin/html.sed itself. Tested make www which rebuilt several index.html files. Updated bin/README.md as well as bin/index.html. Testing that all the html files now are correct wrt Nu checker will have to be done another time, however. --- 1986/bright/README.md | 1 + 1986/bright/index.html | 2 +- 1987/wall/index.html | 2 +- 1988/robison/index.html | 2 +- 1992/albert/index.html | 2 +- 2018/burton2/index.html | 4 +-- bin/README.md | 36 +++++++++++++++++++---- bin/html.sed | 10 +++++-- bin/index.html | 28 ++++++++++++++---- bin/md2html.sh | 63 ++++++++++++---------------------------- bin/subst.entry-index.sh | 45 ++++++++++++++++++++++++---- 11 files changed, 123 insertions(+), 72 deletions(-) diff --git a/1986/bright/README.md b/1986/bright/README.md index 608d53228..4f16c2b25 100644 --- a/1986/bright/README.md +++ b/1986/bright/README.md @@ -29,6 +29,7 @@ program. This gives you a small example of what it is like to maintain the Bourne shell! :-} + ## Author's remarks: No remarks were provided by the author. diff --git a/1986/bright/index.html b/1986/bright/index.html index 3a57d90d9..de2611548 100644 --- a/1986/bright/index.html +++ b/1986/bright/index.html @@ -406,7 +406,7 @@

The International Obfuscated C Code Contest

1986/bright - Most useful obfuscation

-

hex dump with cpp compressed that uses lots of << for constants

+

hex dump with cpp compressed that uses lots of << for constants

diff --git a/1987/wall/index.html b/1987/wall/index.html index d152f5592..67ed60a26 100644 --- a/1987/wall/index.html +++ b/1987/wall/index.html @@ -406,7 +406,7 @@

The International Obfuscated C Code Contest

1987/wall - Most useful obfuscation

-

roman numeral -> decimal and vice versa conversion

+

roman numeral -> decimal and vice versa conversion

diff --git a/1988/robison/index.html b/1988/robison/index.html index 42f9ee988..e1c5f6b10 100644 --- a/1988/robison/index.html +++ b/1988/robison/index.html @@ -406,7 +406,7 @@

The International Obfuscated C Code Contest

1988/robison - Best abuse of C constructs

-

print e in any base using only -- >= and while()

+

print e in any base using only -- >= and while()

diff --git a/1992/albert/index.html b/1992/albert/index.html index c44e9d713..5cfa9a41e 100644 --- a/1992/albert/index.html +++ b/1992/albert/index.html @@ -406,7 +406,7 @@

The International Obfuscated C Code Contest

1992/albert - Most useful program

-

factors multi-precision numbers with factors < MAX_LONG

+

factors multi-precision numbers with factors < MAX_LONG

diff --git a/2018/burton2/index.html b/2018/burton2/index.html index f55bfed7b..d0241d28c 100644 --- a/2018/burton2/index.html +++ b/2018/burton2/index.html @@ -817,8 +817,8 @@ are not recognised when written as -rs in prose).

  • c++98 - reserved words for C++98 standard
  • c99 - reserved words for C99 standard
  • java8 - reserved words for Java v8
  • -
  • kandr2 - reserved words for K&R2 C
  • -
  • kandr - reserved words for K&R C
  • +
  • kandr2 - reserved words for K&amp;R2 C
  • +
  • kandr - reserved words for K&amp;R C
  • patch - author supplied patch to fix iocccsize.c source
  • results - results without -k
  • runtest.sh - test suite
  • diff --git a/bin/README.md b/bin/README.md index 1e2d35c0e..feb6dc90c 100644 --- a/bin/README.md +++ b/bin/README.md @@ -14,10 +14,12 @@ files and other content from the [IOCCC GitHub repo](https://github.com/ioccc-src/temp-test-ioccc). -## [bin/](index.html) tools +## [bin/](index.html) tools options + +With the exception of the `awk(1)` and `sed(1)` scripts, all the tools in this +directory support a number of options that can be used to get help, diagnose +problems, see progress etc. These options are described below. -All tools in this directory support a number of options that can be used to get -help, diagnose problems, see progress etc. These options are as follows: ### Get help / usage string of a tool @@ -35,9 +37,9 @@ from the root directory (of the repo/website), you would do: ### Set verbosity level of a tool -If you want verbosity, say for debugging purposes or to see what is -going on more, you should use the `-v level` option. For instance if you wish to -see what is going on with the +If you want verbosity, say for debugging purposes or to see what is going on +more (than the default), you should use the `-v level` option. For instance if +you wish to see what is going on with the [quick-readme2index.sh](index.html#quick-readme2index) tool, you might do: @@ -412,6 +414,28 @@ Usage: In this case the command will list all the files of the [2020/ferguson1](../2020/ferguson1/index.html) winning entry. +
    +### [html.sed](%%REPO_URL%%/bin/html.sed) +
    + +Translates certain characters in their corresponding HTML entities. For example +`<` is converted to `<` and `>` is converted to `>`. This is important to +satisfy html lints. + +This script is used in [md2html.sh](#md2html) via +[output-index-inventory.sh](#output-index-inventory) and +[subst.entry-index.sh](#subst-entry-index). + +Usage: + +``` + cmd | sed -f bin/html.sed + + sed -f bin/html.sed file > output + + sed -i -f bin/html.sed file +``` +