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.
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.
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 ioccc.css Cascading Style Sheet has updated.
This CSS will serve as a model for generated HTML pages,
especially HTML generated form markdown.
The top level HTML pages will also use this CSS.
This CSS is intended to be functional, black/gray/white, and
good enough for testing purposes.
Added HTML page templates that will be used
by tools in forming HTML pages:
* tmp/template-top.html
* tmp/template-header.html
* tmp/template-footer.html
See the modified
[tmp/README.md](https://ioccc-src.github.io/temp-test-ioccc/tmp/README.md#templates)
for info on the HTML page templates.
Added a test page containing dummy HTML:
* [tmp/test.html](https://ioccc-src.github.io/temp-test-ioccc/tmp/test.html)
This test page was generated from the above mentioned HTML page templates.
It is designed for 3 screen sizes:
* wide screens: 801 pixels wide and larger
* medium-sized screens: 401 pixels to 800 pixels wide
* small-sized screens: 400 pixels wide and smaller
NOTE: Some of top and side bar navigation links do not (yet) work.
If all goes well, the main web site can launch with web pages that
are based on the final ioccc.css. After the main web site is update,
a web designer can improve the look and feel of the web site by
adjusting the ioccc.css, the HTML templates, and the tools used to
generate HTML content.
Due to GitHub not serving nor rendering HTML files whose filename
starts with "." (dot), we renamed `.inventory.html` to `inventory.html`.
Renamed: `tmp/gen_dot_winner.sh` -> `tmp/gen_winner_json.sh`
Fixed URL generation for GitHub links in `inventory.html`.
The manifest was updated accordingly.
The `tmp/README.md` file was updated accordingly.
Fixed an incorrect author win for "1989_jar.2" in `author_wins.numbers`
and `author_wins.csv`.
Changed winner_JSON_format_version to "0.5 2023-11-04".
Added `gen_dot_winner.sh` tool to generate .winner.json and .inventory.html
for a winner. This tool uses [pandoc](https://pandoc.org) to convert
markdown to HTML.
Used this command to generate `.winner.json` and `.inventory.html` for
all winners:
```sh
./run_all.sh -v 1 -D 1 ./gen_dot_winner.sh
```
Updated `tmp/README.md` to reflect the above.
Retired "fake.gen_inventory.sh" to `tmp/OLD_manifest/fake.gen_inventory.sh`.
Added `-D level` flag to `run_all.sh` to specify the `-v level` for
the tool that is being run.
Moved winners_rank to 4th.
Moved ext to 11th.
Renamed path to file_path.
Updated README.md, fix_csv.sh accordingly.
Fix comment cut and paste error in fake.gen_inventory.sh.
The `.id` files are no longer needed and so they were removed.
The `winner_id` (the contents of the `.id` files) are simply
a concatenation of "year" and "_" and "dir".
Adjusted `.inventory.html`, `tmp/README.md`,
`tmp/fake.gen_inventory.sh`, and the manifest according
to the above.
The new tool, tmp/fake.gen_inventory.sh, now adds
a fake .inventory.html file to each winner entry.
Once the winner2nventory tool is written, the .inventory.html
will contain links to all winner files listed in the inventory.
For now, the tmp/fake.gen_inventory.sh tool just creates
a placeholder file.
Now, there is a single manifest called manifest.numbers.
The manifest.csv is formed by exporting manifest.numbers
and running fix_manifest_csv.sh (which was fix_numbers_csv.sh).
The "full_manifest" is now just manifest.
Renamed "file_list.*.txt" to "path_list.txt".
Renamed check_file_list.sh to check_path_list.sh.
The previous set of manifest files are preserved, for now, under
the OLD_manifest directory as a temporary measure in case we need
to revert and very old changes.
Updated README.md, check_path_list.sh and fix_manifest_csv.sh
as per the above changes.
Minor cleanup on a few manifest.number fields.
The manifest now matches the files found in the winning
directories.
The tool, gen_file_list.found.sh, does a make clobber and
generates the list of files found in winning directories.
The tool, check_file_list.sh, may be used to verify that the manifest
matches the list of files found in winning directories.
Made a number of technical adjustments to manifest.numbers
and missing_manifest.numbers.
Moved 2020/ferguson1/*.html entries from manifest.numbers
to missing_manifest.numbers in anticipation of those html
files being generated.
Updated README.md with additional manifest information.
Added more manifest information to tmp/manifest.numbers
and tmp/missing-manifest.numbers. There is MORE empty
fields that need to be filled in.
Renamed some tmp files:
tmp/author-names.txt -> tmp/author_names.txt
tmp/author-wins.csv -> tmp/author_wins.csv
tmp/missing-manifest.csv -> tmp/missing_manifest.csv
tmp/year-prize.csv -> tmp/year_prize.csv
Added fix_numbers_csv.sh to post-process CSV files exported by numbers.
The DOS file format is converted into a Unix file format and
the CSV file is canonically sorted. Then both tmp/manifest.csv
and tmp/missing_manifest.csv are combined and canonically sorted
to form tmp/full_manifest.csv.
Finally the tmp/full_manifest.csv file was imported into numbers
and saved as a numbers file.
The `manifest.numbers` contains information about files, that
must already exist. See `README.md` for details.
The `manifest.csv` is generated from `manifest.numbers`.
See `README.md` for details on how it is generated.
The `missing-manifest.numbers` contains information about files,
that may not yet exist because a tool needs to create it.
The `missing-manifest.csv` is generated from `manifest.numbers`.
See `README.md` for details on how it is generated.
Updated `example.dot_winner.json` as per fields in
the `manifest.numbers` spreadsheet.
The `file_list.txt` contains paths of all files that should
already exist, or will be created by a tool.
The `winner_dir.txt` contains a list of paths to
winning directories.
Updated `README.md`.
NOTE: The `manifest.numbers` and `missing-manifest.numbers` are
initial draft files and will be worked in and modified.
In particular, empty cells represent values that need to be
added, or replaced with null if not such field file is needed.
NOTE: Lines from `missing-manifest.numbers` will be moved
into `manifest.numbers` as they are created. Eventually
the `missing-manifest.numbers` spreadsheet will be come empty
and, along with `missing-manifest.csv` will be removed.
NOTE: Some files, such as `.id` files are temporary,
are not listed in any contents of the above files,
and will be removed.
The `author/author_handle.json` file content was generated
by the commands:
```sh
cd tmp
rm -rf ../author
./gen_author_json.sh author_handle.txt author.csv author-wins.csv ../author
```
Also installed is `author/README.md` that describes the `author/`
directory tree and author_handle.json format.
Some tmp files were slightly modified before to help the
`gen_author_json.sh` tool.
NOTE: The `gen_author_json.sh` tool is under the `tmp/` directory
and **NOT** the `bin/` directory. Like the files under tmp/`
directory, the `gen_author_json.sh` tool will go away as the files
and tool are not needed.
The `author/author_handle.json` files will become authoritative,
replacing the `gen_author_json.sh` tool and files under tmp/`
directory. However we will keep them around for a while, at least
a git of time after issue #4 is resolved.
Made significant changes to `README.md` to:
0. explain the purpose of the tmp directory and its eventual fate
1. define terms
2. list files under `tmp` and explain their format
Renamed the following `tmp` files:
winners.csv -> author.csv
winners.numbers -> author.numbers
winner-handles.csv -> author_handle.txt
example.author_handle.json -> example.author.json
winning_handles.txt -> winner_id.txt
year-auth-prize.csv -> year-prize.csv
Make minor changes to `winners.numbers` and exported a new `winners.csv`
file.
Add link to CSV files in the tmp/README.md file.
Rename CSV files to better reflect their contents.
Update header in each CSV file to better reflect the contents.
This tmp directory will go away.
The purpose of this directory is to hold temporary files.
For example: CVS text files, that will later be used to generate JSON files.