The manifest does not allow for a cell value to be empty.
HINT: By default, the conditional formatting of the [manifest numbers spreadsheet](tmp/manifest.numbers) will turn the background of an empty cell to red.
Made minor fixes to the tool.
Updated manifest as per recent file changes.
Updated winner `.winner.json` to reflect the manifest changes.
Added [bin/all_run.sh](bin/all_run.sh) tool to run a command over
all winning entries.
These tools had slight improvements in the help usage message:
* bin/gen-author.sh VERSION="1.3.1 2024-01-16"
* bin/gen-inventory.sh VERSION="1.0.1 2024-01-16"
* bin/pandoc_wrapper.sh VERSION="1.3.1 2024-01-16"
* bin/subst.default.sh VERSION="1.1.1 2024-01-16"
* bin/subst.winner-index.sh VERSION="1.1.1 2024-01-16"
The `bin/readme2index.sh` tool was improved so that
if the `index.html` file exists and the tool forms
the exact same content, then the file `index.html`
file is NOT touched.
* bin/readme2index.sh VERSION="1.1 2024-01-16"
We used the following command to generate `index.html` files
for all winning entries:
```sh
bin/all_run.sh -v 3 bin/readme2index.sh
```
NOTE: We have not (yet) built HTML files above the winner directory
level (e.g., no year level nor top level HTML), nor have be built
non-index HTML files for winners.
NOTE: By default we are running `pandoc(1)` with:
```
--fail-if-warnings=true
```
This means that any problems with markdown to HTML
generates an error. This is done to be sure that
the HTML conversion is clean.
We had to fix the following `README.md` files:
* `2000/rince/README.md`
The reference [^2] was never used. We made a guess that [^2] applies
to the same spot as [^1]. Perhaps there is a better spot where
[^2] applies?
NOTE: For every reference, there MUST be some place where that
reference is used.
* 2012/vik/README.md
The string "$...$" is assumed to be a TeX encoded string.
NOTE: Every "$..$" needs to be backslashed as in "\$..\$".
* 2018/burton1/README.md
The reference [2] was duplicated. We changed the
second [2] to [3].
NOTE: Every reference needs to have a unique number.
* 2020/carlini/README.md
The string "$...$" is assumed to be a TeX encoded string.
NOTE: Every "$..$" needs to be backslashed as in "\$..\$".
We also found 2 errors in the `author/author_handle.json` file set:
* author/Anonymous_2001.json
The `author/Anonymous_2001.json` file was missing.
* author/Jari_Arkko.json
The winner ID for `1989_jar.1` had a typo.
New version: 0.0.3-0 2024-01-15.
The following options were added:
-N set dry run mode: just show what would be changed (def: make changes)
-S sed set path to sed(1) (def: $SED)
-G grep set path to grep(1) (def: $GREP)
where $SED and $GREP are set previously by
SED="$(type -P sed)"
GREP="$(type -P grep)"
I am not happy with -N: I'd like it to be -n to match other tools.
However the -n is already used to update the news date. Since doing that
is far more common (in use) than a dry-run I have the dry-run as a
majuscule ('upper case') letter and the news update date option as a
minuscule ('lower case') letter.
The verbosity level check was slightly modified too. If >= 1 (was > 1)
then show what will change (assuming any change requested). If -N
specified then it shows what WOULD HAVE changed (and then exits). If
verbosity > 1 it shows what (for those with a requested change) was
changed (and to what).
It is known that the status.json might have a different format so this
commit might be premature (and I might need to rewrite the tool
entirely) but it was on my mind so I decided to do it as I am not awake
enough to do other things.
The initial release of `bin/readme2index.sh` tool that converts
`READMD.md` and various JSON files such as `.winner.json`
as well as "author/author_handle.json" files.
Applied the `readme2index.sh` tool to generate `2020/ferguson1/index.html`.
We generated the `2020/ferguson1/index.html` by executing:
```sh
./bin/readme2index.sh -v 3 2020/ferguson1
```
NOTE: This above tool requires **pandoc to be installed**.
See the [pandoc web site](https://pandoc.org) for how
to install. We used _HomeBrew_ to install it,
but there is also a _macports_ process as well.
NOTE: While the above web page does have formatting issues, it is
a first attempt data driven programmatic web page generation.
Some adjustments can be made by mostly improving `ioccc.css`,
and some perhaps by modifying how `bin/pandoc_wrapper.sh`
invokes pandoc. But probably most of the improvements can
be made by fixing and improving `ioccc.css`.
TODO: Fix and improve the `2020/ferguson1/index.html`
web page by fixing and improving `ioccc.css`.
Moved scripts and tools needed to generate HTML pages
into a new `/bin` subdirectory.
TODO: Consider getting rid of the [build-ioccc
repo](https://github.com/ioccc-src/build-ioccc) and just use the
`/bin` subdirectory.
NOTE: Some links in the `2020/ferguson1/index.html`
web page do not (yet) exist.
TODO: Once the basic format of the `2020/ferguson1/index.html` web
page is somewhat reasonable, generate `index.html` pages for other
winners. Generate the year level `index.html' files.
Generate the top level HTML files, including the missing
`location.html` file.
Greatly simplified the `.winner.json` file format,
removing a number of fields that were not strictly needed
for generating an inventory on a `index.html` page.
Updated various versions:
* `bin/gen-author.sh` VERSION="1.3 2024-01-14"
* `bin/gen-inventory.sh` VERSION="1.0 2024-01-14"
* `bin/manifest.winner.json.awk` VERSION="1.0 2024-01-14"
* `bin/pandoc_wrapper.sh` VERSION="1.3 2024-01-14"
* `bin/readme2index.sh` VERSION="1.0 2024-01-14"
* `bin/subst.default.sh` VERSION="1.1 2024-01-14"
* `bin/subst.winner-index.sh` VERSION="1.1 2024-01-14"
* `tmp/gen_path_list.found.sh` VERSION="1.1 2024-01-14"
* `tmp/gen_winner_json.sh` VERSION="1.1 2024-01-14"
The `.winner.json` file format from winner_JSON_format_version
"0.5 2023-11-04" to "1.0 2024-01-14".
All `.winner.json` files have been updated to use the
new `.winner.json` file format.
The manifest (`tmp/manifest.numbers` and `tmp/manifest.csv`) has
updated to use the new `.winner.json` file format.
The following procedure was used to generate the
`tmp/manifest.csv` manifest file:
0. open [manifest.numbers](manifest.numbers) in numbers: modify if/as needed
NOTE: Please try to keep the [manifest.numbers](manifest.numbers) spreadsheet
in order order. Use Organize -> Sort -> ((Sort Now)) to sort.
NOTE: Empty fields in the [manifest.numbers](manifest.numbers) spreadsheet
are not allowed. By default, a cell that is empty is colored
as a warning.
1. File -> Export To -> CSV...
* 1a. `[ ]` Include table names (unset)
* 1b. Text Encoding: Unicode (UTF-8)
* 1c. Click ((Save..))
2. Save As: manifest.csv
* 2a. Select the `tmp` directory
3. Click ((Export))
* 3a. If needed click ((Replace))
4. Execute ./tmp/[fix_csv.sh](fix_csv.sh)
NOTE: You must run the [fix_csv.sh](fix_csv.sh) in the above
step in order to make the CSV file usable by other tools.
NOTE: If no changes are needed in the above step, the
original file content will be restored.
5. Execute ./tmp/[gen_path_list.found.sh](gen_path_list.found.sh)
NOTE: The above step silently performs a `make clobber` at the
top level, and so it takes a bit of time.
NOTE: If no changes are needed in the above step, the
original file content will be restored.
6. Execute ./tmp/[check_path_list.sh](check_path_list.sh)
NOTE: The above step prints nothing and for an exit 0, then
all is well. If there is a problem, such as files
found that are not part of the manifest, or files
in the manifest that are not found, then an error
message will be printed and the tool will exit non-zero.
If errors are reported, go back to step 0 and
correct the errors.
7. Execute ./tmp/[run_all.sh](run_all.sh) ./gen_winner_json.sh
NOTE: The above step will take a few seconds to run. It will rebuild
all `.winner.json` files for all winners.
NOTE: If no changes are needed in the above step, the
original file content will be restored.
8. Execute `git status` and inspect changes
NOTE: Check in changes if and as needed.
NOTE: In a number of shell scripts under `bin/*.sh`,
and in the `bin/manifest.winner.json.awk` script
you will find comments of the form:
```
```
This is a note that when tools such as `jnamval` (and `jval` and `jfmt`) are
ready, these gross hacks should be replaced with calls to those tools.
Until they are ready, some must be careful with the layout of JSON files.
A number of bugs and typos have been fixed.
NOTE: Fixing typos in the files touched by this comment is welcome.
This includes scripts, data files, text files, etc.
The _inventory_order_, _display_as_, _display_via_github_. and
_winners_text_ fields of the [manifest.numbers](manifest.numbers)
spreadsheet were just set to have some initial values.
As they impact the inventory displayed on `index.html` pages,
their content needs to be improved.
NOTE: Improving the above mentioned fields of the
[manifest.numbers](manifest.numbers) spreadsheet is welcome.
I believe the item of checking in the Makefiles for primary target
failing resulting in building the alt version (where desired) is now
done so this has also been removed from the todo file.
I believe that the task of dealing with messages/warnings in the
Makefile about compilation has now been addressed. If this is not the
case it will be fixed in time but I believe it has been done.
Update the manifest as per recent file changes.
Removed inventory.html from all winners as the inventory will be
added to the winner `index.html` instead,
Updated winner `.winner.json` files as per the above.
Add code to `readme2index.sh` to implement HTML phases 20, 21 and 22.
Improve `inc/gen-author.sh` to put blank lines around
the pandoc tool output.
Changed `inc/gen-author.sh` VERSION from "1.1 2024-01-01"
to "1.2 2024-01-04".
The `tmp/readme2index.sh` tool now processes all the HTML phases,
except 20, 21, and 22.
Added missing -N early exits to various inc/*.sh tools.
Released VERSION "1.0 2024-01-02" of `inc/subst.default.sh`.
Renamed `inc/subst.readme.sh` to `inc/subst.winner-index.sh`.
Released VERSION "1.0 2024-01-02" of `inc/subst.winner-index.sh`.
Added `inc/topnav.first.html` and `inc/topnav.last.html` to
handle the 1st and last winners of a given year.
Added various fixes to `tmp/readme2index.sh`.
Improved debugging statements from `tmp/readme2index.sh`.
TODO: Add code to process HTML phases 20, 21, and 22.
TODO: Modify `inc/subst.winner-index.sh` to handle topnav links.
TODO: Add inventory links in some form to `index.html`.
TODO: Figure out how to best generate `inventory.html'.
Added Left - class for placing things on the left side
Added Right - class for placing things on the left side
Added Disabled - class for making something as if the feature has been disabled
Improved Responsive Web Design, adjusted font sizes and scaling.
Now Default: screen is > 968 pixels wide (> 984 w/padding)
Adapts when screen is > 761 pixels (> 777 w/padding) AND <= 968 pixels wide (<= 984 w/padding)
Adapts when screen is > 500 pixels (> 515 w/padding) AND <= 761 pixels wide (<= 777 w/padding)
Adapts when screen is <= 500 pixels wide: (<= 515 w/padding)
Changed tmp/test,html to help test this new part of the CSS.
Set select variables ahead of USAGE so that the
help message contains certain default values.
Added -u repo_url to `tmp/readme2index.sh` and `inc/pandoc_wrapper.sh` for
the URL of the final target repo from where HTML files will be viewed.
Add missing Copyright to `inc/pandoc_wrapper.sh`.
Require a `.winner.json` under _yyyy/dir_.
Change `tmp/readme2index.sh` VERSION from "0.3 2023-12-31"
to "0.4 2023-12-31".
Change `inc/pandoc_wrapper.sh` VERSION from "1.0 2023-12-29"
to "1.2 2023-12-31".
Improve the parameter debugging under -v 3.
Fixed various typos.
The -P optstr default for `readme2index.sh` now defaults to:
-f markdown -t html --fail-if-warnings=true
The default -P optstr and -p tool are now displayed
in the help message of `readme2index.sh`.
The `readme2index.sh` VERSION changed from "0.2 2023-12-29"
to "0.3 2023-12-31".
The '-p tool' and '-P optstr' will be passed as leading options on the
-b tool and -a tool command lines, not to the '-o tool' command lines.
Improve help text for readme2index.sh.
The `inc/md2html.cfg` file was updated so that the comment
about options matches the `readme2index.sh` tool usage message.
The `readme2index.sh` tool does a more consistent job of checking
options in the help message and reporting when something violates
a restriction.
In many cases the parameters (_$OPTARG_) of an option is not allowed
to contain a single-quote, nor a double-quote. We prevent use of
single-quotes and double-quotes in cases where passing such to other
tools may create a problem.
There are a few exceptions to the above mention "single-quote /
double-quote" restrictions. For example, the "-s token=value" does
NOT have such a restriction. In the case of "-s token=value", we
can allow for the single-quotes and double-quotes because the ;
(semicolon) is used as a regex separator instead.
We also better explain the cumulative nature of "-s token=value".
Some help message wording cleanup was performed.
The `inc/md2html.cfg` file was updated so that the comment
about options matches the `readme2index.sh` tool usage message.
With -N, just parse arguments and ignore the file.
Change readme2index.sh version from "0.1 2023-12-10"
to "0.2 2023-12-29". The previous change in
commit d5c4171d73
forgot to update the version number.
The `tmp/sample_getopt.sh` is now `tmp/readme2index.sh`, a tool
that goes thru the motions of multi-phase getopt processing, scanning
the `inc/md2html.cfg` for the first match, and calls various stub tools.
The `inc/md2html.cfg` has been improved to document a cleaner getopt
phase model.
There are certainly more including some I encountered yesterday that are
not fixed but these can be fixed later on. These are just quick (and
incomplete) looks at some of the scripts.
I found another place where the wrong file is referred to in an entry:
in particular 1992/buzzard.2 refers to a file in 2020/ferguson2. This
type of thing will have to be checked for for all entries but this is an
example for future reference (I discovered it as I am working on a task
of 1992/buzzard.2).
The script had "s surrounding the git ls-files command which turned it
to a single file which of course is wrong.
Ran script again fixing many README.md files that had incorrect number
of blank lines for critical headers.
This will have to be done a final but a good number of files have been
corrected.
In alt code where a call to usleep(3) is made to allow for configuring
speed originally I used the macro 'Z'. In one case 'Z' was already taken
so I changed it to 'S' for that entry. I had the thought it might be
nice to make it always the same. This however is not possible as more
entries already have 'S' used. Also it's not important since I changed
the Makefiles so that one can specify it like 'make clobber SLEEP=500
alt' or whatever, removing the macro name and having to mess with
'CDEFINE'.
Adjusted `inc/md2html.cfg` to improve the 3 phase parse process.
Added `tmp/sample_getopt.sh` as a demo of the 3 phase parse of command
line options and arguments for that a markdown to HTML tool that
uses the `inc/md2html.cfg` configuration file.
Try:
```sh
cd tmp
./sample_getopt.sh -v 3 foo
```
The `tmp/sample_getopt.sh` tool performs a somewhat complicated 3
phase getopt parse of simulated command line options and arguments
that a tool converting markdown to HTML and using the `inc/md2html.cfg`
configuration file would perform. The tool does not actually use
the `inc/md2html.cfg`, it just simulates the complex 3 phase getopt
parsing procedure.
Updated `tmp/README.md` accordingly.
The new variables in the Makefile, with defaults, are:
FIRE= XK_BackSpace:XK_Tab
FORWARD= XK_Up:XK_w
BACKWARD= XK_Down:XK_s
LEFT= XK_Left:XK_a
RIGHT= XK_Right:XK_d
WIDTH= 512
HEIGHT= 288
An example of how to set some is in the README.md file.
This commit means I can remove an item from the things-todo.md file
which I have now done. Next I can return to 2018.
That is the comments have a general form and if they're for the alt code
they're defined in the alt code section. If they're for the entry and
the alt code they're above the CDEFINE variable.
The thanks file has been updated where it was needed.
Now only entries that have not been done need this improvement.
As the thanks-for-fixes.md file was renamed (at my suggestion)
thanks-for-help.md I have made sure that the file referred to in the
repo is thanks-for-help and that the text regarding it also refers to
help and not fixes ('Thanks for the fixes' -> 'Thanks for the help').