Commit Graph
40 Commits
Author SHA1 Message Date
Landon Curt Noll d9d2d2a127 move terms fron tmp to bin README.md 2024-01-21 21:46:53 -08:00
Landon Curt Noll c6e6201209 release readme2index.sh version 1.0 2024-01-14
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.
2024-01-14 22:03:28 -08:00
Landon Curt Noll d5c4171d73 checkpoint on tmp/readme2index.sh
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.
2023-12-29 20:55:35 -08:00
Landon Curt Noll a4bd2fff67 add sample 3 phase parse command line parse
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.
2023-12-18 00:30:11 -08:00
Landon Curt Noll b40d35f4a2 added tmp/echo.sh test tool 2023-12-05 22:47:08 -08:00
Landon Curt Noll 122142d39d update tmp purpose
Also mention the build-ioccc repo.
2023-12-03 13:47:57 -08:00
Landon Curt Noll 7d9111cdda update ioccc.css, add HTML templates & test page
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.
2023-11-29 23:35:08 -08:00
Cody Boone Ferguson 750ad863d1 Typo fix in tmp/README.md file 2023-11-25 03:10:59 -08:00
Landon Curt Noll 486d3614b8 move ioccc.css to tmp/old-ioccc.css
The previous version of `/ioccc.css`, now `tmp/old-ioccc.css` to make
room for the new IOCCC css being developed.
2023-11-24 19:32:59 -08:00
Landon Curt Noll e00d20111d rename .inventory.html -> inventory.html
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.
2023-11-06 02:23:30 -08:00
Landon Curt Noll 4f88c4214b add initial .winner.json and .inventory.html for winners
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.
2023-11-06 00:22:19 -08:00
Cody Boone Ferguson 558a44af76 Typo fixes in tmp/README.md and tmp/run_all.sh 2023-11-05 02:16:38 -08:00
Landon Curt Noll 1243a86d57 reorder fields in manifest.numbers
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.
2023-11-05 01:49:02 -07:00
Landon Curt Noll 5f8b1a8841 rename fix_manifest_csv.sh -> fix_csv.sh, fix other CSV files
The fix_csv.sh now fixes the other 3 CSV files:

    author.csv
    author_wins.csv
    year_prize.csv
2023-11-01 01:43:57 -07:00
Landon Curt Noll 7cb3c44a3b removed .id files from winning dirs
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.
2023-11-01 01:19:36 -07:00
Landon Curt Noll e69240ca3e add tmp/author_wins.numbers 2023-11-01 01:12:27 -07:00
Landon Curt Noll 542c687cb7 add year_prize.numbers
The year_prize.numbers is used to form year_prize.csv.
2023-11-01 01:00:28 -07:00
Landon Curt Noll a17fe36163 add tmp/fake.gen_inventory.sh tool
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.
2023-11-01 00:47:43 -07:00
Landon Curt Noll d6f3d20bac improve winner index.html for a validator attempt 2023-10-31 22:40:25 -07:00
Landon Curt Noll 929381ba0d add tmp/fake.gen_index.sh and tmp/run_all.sh 2023-10-31 22:23:48 -07:00
Landon Curt Noll 51c179b895 update manifest
Fixed null winners_text files.

Fixed missing html files that will be made
from the md2html tool via a markdown file.
2023-10-29 15:06:35 -07:00
Landon Curt Noll 9cce43fb18 use a single manifest 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.
2023-10-27 01:39:29 -07:00
Landon Curt Noll e3b55e0cc5 move ext field in manifest from 11th to 8th column 2023-10-26 23:50:46 -07:00
Landon Curt Noll d527911896 complete manifest by adding missing entries
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.
2023-10-26 23:14:11 -07:00
Landon Curt Noll 730138b3cd rename check_awards.sh -> awards_check.sh 2023-10-26 20:28:03 -07:00
Landon Curt Noll c7c75c3bc8 rename gen_file_list.sh -> gen_file_list.found.sh 2023-10-26 19:51:00 -07:00
Landon Curt Noll 9e9b602281 rename file_list.txt -> file_list.found.txt 2023-10-26 19:44:22 -07:00
Landon Curt Noll aede8cc0c2 add file_list.full_manifest.txt to manifest set 2023-10-26 19:24:13 -07:00
Landon Curt Noll 4621ecd39f added more path files created from the full manifest
Added file_list.built.txt and file_list.required.txt files.
2023-10-26 19:10:46 -07:00
Landon Curt Noll 036210bf34 move created_by to 5th manifest column 2023-10-26 18:42:10 -07:00
Landon Curt Noll c5fa6d6d11 update file_list.txt via new the gen_file_list.sh tool 2023-10-26 17:09:05 -07:00
Landon Curt Noll c0e84b0635 improve manifest content and README.md
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.
2023-10-26 16:37:08 -07:00
Landon Curt Noll afed94b5f7 checkpoint manifest, added fix_numbers_csv.sh
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.
2023-10-18 12:48:40 -07:00
Landon Curt Noll 749f4644a1 added initial draft of manifest.
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.
2023-08-01 02:50:36 -07:00
Cody Boone Ferguson c5f5e42bd3 Typo and format fix tmp/README.md
...at least temporarily :-)
2023-07-12 03:55:38 -07:00
Landon Curt Noll 469d27489f install all author/author_handle.json files
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.
2023-06-11 00:11:20 -07:00
Landon Curt Noll 4b5bf543b0 update and improve files under tmp
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.
2023-05-22 00:26:59 -07:00
Cody Boone Ferguson bf59103641 Add missing files to list in tmp/README.md 2023-04-27 03:23:14 -07:00
Cody Boone Ferguson b006d0da5c Update tmp/*.csv and tmp/README.md
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.
2023-04-08 04:08:20 -07:00
Landon Curt Noll 20bdd71194 Create top level tmp directory
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.
2023-04-06 17:38:56 -07:00