Files
ioccc/tmp
Cody Boone Ferguson de8ee5f41a Many manifest improvements and fixes
This is a large update that modifies every .entry.json file and fixes
many others. The changes of every .entry.json file are as follows:

- change 'entry source' to 'entry source code' [0]
- change 'original source' to 'original source code' [0]
- change 'directory path from top directory' to 'directory path from top
  level directory'

[0] This is for consistency purposes. Other options were pondered but as
the index.html files refer to 'Alternate code' this was the simplest way
to go about it and it also feels more natural. A question was whether to
have 'entry code' and 'original entry code' or to have the word 'source'
added to it but I decided upon including the word 'source'. Another
question has occurred to me is whether or not 'original source code'
should instead be 'original entry source code' but that can be decided
upon later as that occurred to me after much of the files were already
rebuilt. The consistency that this commit has made is for the README.md
sections and in particular 'Alternate code'. One might wonder if that
should be changed to 'Alternate source code' as now the manifest
includes 'source' in the 'entry code' and 'original code' but the
manifest itself is what was actually updated and having 'source' feels
more natural for submitted files. After all not all entries have
alternate code. These questions can be decided on when looking at the
index.html files that have been rebuilt.

Changed 'alt code' to 'alternate code' where this was not already done
(in the manifest). It is questionable whether this should be done in
markdown files or not (in the README.md files section it already is done
but not necessarily in other places).

Many files had incorrect descriptions that have been checked.

Renamed 2020/endoh2/spoiler/spoiler.{md,html} to index.{md,html} so one
can go to just 2020/endoh2/spoiler and see the web page. Although the
manifest of 2 020/endoh2/index.html will link to it and that's probably
how most people will notice it it seems useful especially as the web
page links to the different files in spoiler/ or at least refers to
them, giving a description (kind of like the manifest in
2020/endoh2/index.html).

Due to the above changes all the entries had their index.html files
regenerated too.

There were likely other changes and fixes as well.

What has NOT been done is a check over all items, typos or otherwise,
though some typos have been fixed. Nonetheless this commit goes a long
way to resolving issue #1933.

Updated thanks file both with a missing <div> id and added a manifest
improvements section as the manifest is quite important.
2024-05-15 08:54:31 -07:00
..
2024-04-18 02:46:01 -07:00
2024-03-10 10:05:08 -07:00
2024-04-26 16:34:28 -07:00
2024-05-01 09:53:30 -07:00

tmp

The tools under this directory are an alpha release. The bin directory holds the formal release of tools that will maintain the official IOCCC web site.

Currently these tools maintain the experimental web site by default, via the temp-test-ioccc GitHub repo. These tools will default to using the temp-test-ioccc repo and the experimental web site until the official IOCCC web site, via the IOCCC winner repo is ready for the mass pull request/merge.

IMPORTANT: The purpose of the tmp directory is to hold temporary files. The files in the tmp directory will go away leaving behind an empty tmp directory.

purpose

This documentation is here to help define terms, files under tmp/ and the format of those files.

NOTE: The terms section may be moved to another file later on, after the contents of this directory are removed.

files

OLD_manifest

The files in the OLD_manifest were in the top of the tmp directory as of 2023 Oct 26. They represent the first complete manifest that matched the YYYY/dir entry directories.

These files in this directory are kept as a temporary snapshot.

Some obsolete files and tools were moved under OLD_manifest.

README.md

This file.

author_handle.txt

A text file containing author_handles for each author: one author_handle per line.

author_names.txt

A text file of full names of each author: one full name per line.

In the case of anonymous authors the form is:

    Anonymous YYYY

author_wins.csv

The author_wins.csv is a CSV file that was exported from the author_wins.numbers file.

In case of conflict, the data in author_wins.numbers file is considered authoritative over the author_wins.csv file.

The author_wins.csv.csv is generated from the author_wins.numbers file, via the macOS Numbers spreadsheet app, as follows:

  1. open author_wins.numbers in numbers: modify if/as needed

  2. File -> Export To -> CSV...

    • 1a. [ ] Include table names (unset)
    • 1b. Text Encoding: Unicode (UTF-8)
    • 1c. Click ((Save..))
  3. Save As: author_wins.csv

    • 2a. Select the tmp directory
  4. Click ((Export))

    • 3a. If needed click ((Replace))
  5. Execute ./fix_csv.sh

author_wins.numbers

A macOS Numbers spreadsheet: one line per author.

The first field is an author_handle.

The other fields are the entry_id's of all YYYY/dir entry's won by the author.

check_path_list.sh

Look for problems with path_list.required.txt, path_list.manifest.txt, and path_list.found.txt files. In particular, the files found in winning directories are compared with the list of required files as well as the complete manifest list of files.

If all is OK, check_path_list.sh exits 0 and prints nothing. If there are missing required files, or extra files found then check_path_list.sh will exit non-zero and print information about problems.

echo.sh

Tool that simply echos it arguments: used to test run_all.sh.

entry_dir.txt

A list of paths to YYYY/dir entry directories that reside under year directories.

entry_id.txt

A text file containing entry_id strings: one entry_id per line.

example.author.json

This is a JSON file containing an example author/author_handle.json for a fictitious author.

example.dot_entry.json

This is a JSON file containing an example year/dir/.entry.json for a fictitious winning YYYY/dir entry.

A year/dir/.entry.json file will be derived from the contents the year/dir/.id file, the author_wins.csv file, the year/dir/.year file, and the the manifest.csv file.

The 11 field names in manifest.numbers match the JSON member names found in example.dot_entry.json.

fix_csv.sh

This tool will fix CSV files exported by macOS Numbers by removing carriage returns and appending a newline if it was missing.

Fixing involves these actions:

    tr -d '\015' < input.csv > tmp.csv
    echo >> tmp.csv
    mv -f tmp.csv input.csv

This tool also forms path_list.built.txt, path_list.manifest.txt, and path_list.required.txt from manifest.csv.

format-headers.sh

This tool helped format the README.md files for YYYY/dir winning entries.

gen_entry_json.sh

Generate a .entry.json for a given winning YYYY/dir entry.

gen_path_list.found.sh

The list of paths of files in all winning entries.

After doing a make clobber this tool updates, if needed, form path_list.found.txt.

manifest.csv

The manifest.csv is a CSV file that was exported from the manifest.numbers file.

In case of conflict, the data in manifest.numbers file is considered authoritative over the manifest.csv file.

The manifest.csv is generated from the manifest.numbers file, via the macOS Numbers spreadsheet app, as follows:

  1. open manifest.numbers in numbers: modify if/as needed

  2. File -> Export To -> CSV...

    • 1a. [ ] Include table names (unset)
    • 1b. Text Encoding: Unicode (UTF-8)
    • 1c. Click ((Save..))
  3. Save As: manifest.csv

    • 2a. Select the tmp directory
  4. Click ((Export))

    • 3a. If needed click ((Replace))
  5. Execute ./fix_csv.sh

manifest.numbers

A macOS Numbers spreadsheet contains information about files in YYYY/dir entry directories under year directories. This file as the following fields:

  1. year:

    IOCCC year as a 4-character string. Normally this would be a 4 digit year string, however it may also be a string such as "mock".

    NOTE: If year begins with "#", then dir is a comment, and the rest of the row is to be ignored. Rows of this form do NOT contain manifest information for a file.

  2. dir:

    Directory name number the IOCCC year.

  3. path:

    Path under the IOCCC/directory. In a few cases this is a path, not just a simple filename under the IOCCC/directory.

  4. inventory_order:

    This number is the rank showing the order that this file is to be listed for the given entry's in the winning entry's index.html file.

    If the number is 9 digits or less, then the given file is considered a primary file when listed in the inventory of files for a given winning YYYY/dir entry.

    If the number is 10 digits or more, then the given file is considered a secondary file when listed in the inventory of files for a given winning YYYY/dir entry We recommend using the value 4294967295 (2^32-1) for secondary files.

  5. OK_to_edit:

    If the value is true, then the file is one that may be edited directly.

    If the value is false, then the file should NOT be edited, because the given file is generated by a tool. One should NOT modify such a file directly, but instead modify source files (i.e., markdown files, JSON files, etc.)

  6. display_as:

    The type of given file.

  7. display_via_github

    If true, then the contents of the file should be viewed via the GitHub repo.

    If false, then the contents of the file should be viewed in the web browser directly. In some cases this may result in the file being downloaded instead of being displayed.

  8. entry_text:

    Any text that should be displayed at the end of line in index.html (with a preceding " - "), or null is no such text is to be displayed.

The 8 field names in manifest.numbers, must match the JSON member names found in example.dot_entry.json.

NOTE: Cells containing true or false are JSON booleans. NOTE: All other cells are JSON strings that need to be double quoted, including the year. NOTE: Do not put commas, nor quotes, nor newlines in fields as these are bound to cause problems.

In case of conflict, the data in manifest.numbers file is considered authoritative over the manifest.csv file.

path_list.built.txt

A list of file paths (from the top directory) of YYYY/dir entry directories, that are built from other primary content files.

These paths are formed from manifest.numbers entries where the "created_by" (5th) field is null. See manifest.numbers for details on the fields.

This file is formed by the fix_csv.sh tool.

path_list.found.txt

A list of files that exist, or should exist once the tools to generate certain files, such as the index.html, or the .entry.json files for each entry, are created.

This file is created by gen_path_list.found.sh.

path_list.manifest.txt

This is the list of file paths, both primary and constructed files from YYYY/dir entry directories.

This file is formed by the fix_csv.sh tool.

path_list.required.txt

A list of file paths (from the top directory) of YYYY/dir entry directories, that are required to exist.

These paths are formed from manifest.numbers entries where the "created_by" (5th) field is non-null. See manifest.numbers for details on the fields.

This file is formed by the fix_csv.sh tool.

run_all.sh

A tool to run another tool over all YYYY/dir entry directories.

Examples:

    ./run_all.sh -v 3 ./fake.gen_index.sh
    ./run_all.sh -v 1 ./gen_entry_json.sh

md-chk-paths.sh

Print full directories of local (non-remote URL) markdown paths.

Usage:

    tmp/md-chk-paths.sh

md-links.sh

For all markdown files, print markdown links.

Usage:

    tmp/md-links.sh

Lines printed are of the form:

    markdown_path.md [pseudo title](path)

md-local-links.sh

For all markdown files, print markdown links that are local. We ignore URLs that start with "http:" or "https:" or "mailto:". We ignore links that are internal to the file (i.e., "#name").

Usage:

    tmp/md-local-links.sh

Lines printed are of the form:

    markdown_path.md [pseudo title](path)

md-token-links.sh

For all markdown files, print markdown links that start with a %%TOKEN%%.

Usage:

    tmp/md-token-links.sh

Lines printed are of the form:

    markdown_path.md [pseudo title](%%TOKEN%%path)

Print local file paths referenced in markdown links.

We ignore URLs that start with "http:" or "https:" or "mailto:". We remove "%%REPO_URL%%/" and "%%DOCROOT_SLASH%%" from paths. We delete lines with "%%TOKEN%%" as this is just a test/example token.

Usage:

    tmp/md-link-paths.sh

Lines printed are of the form:

    path

src

This is a temporary location for potential tools that are used to build and maintain the www.ioccc.org web site.

things-todo.md

A todo list of known things to check and/or do.

update-manifest.sh

Interactive script to update the IOCCC manifest step by step post manifest.csv export.

year_prize.csv

The year_prize.csv is a CSV file that was exported from the year_prize.numbers file.

In case of conflict, the data in year_prize.numbers file is considered authoritative over the year_prize.csv file.

The year_prize.csv.csv is generated from the year_prizes.numbers file, via the macOS Numbers spreadsheet app, as follows:

  1. open year_prize.numbers in numbers: modify if/as needed

  2. File -> Export To -> CSV...

    • 1a. [ ] Include table names (unset)
    • 1b. Text Encoding: Unicode (UTF-8)
    • 1c. Click ((Save..))
  3. Save As: year_prize.csv

    • 2a. Select the tmp directory
  4. Click ((Export))

    • 3a. If needed click ((Replace))
  5. Execute ./fix_csv.sh

year_prize.numbers

A macOS Numbers spreadsheet: one line per YYYY/dir entry directory.

The first field is a entry_id.

The second field is the name of the award for given YYYY/dir entry.