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.
This commit is contained in:
Landon Curt Noll committed 2023-11-05 01:49:02 -07:00
1 parent 33fa379314
commit 1243a86d57
6 files changed
+4223 -4224

No files matched your search

+14 -14
View File
@@ -405,17 +405,17 @@ This file as the following fields:
Directory name number the IOCCC year.
3. winners_rank:
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. winners_rank:
If a number, then this is the winners rank showing the order
that this file is to be listed for the given entry's in
[winners.html](winners.html), or null if the file is not to be listed.
4. path:
Path under the IOCCC/directory. In a few cases this is a path,
not just a simple filename under the IOCCC/directory.
5. created_by:
The name of the program that creates this file, or null is the
@@ -439,12 +439,7 @@ This file as the following fields:
The type of file.
8. ext:
This ending filename extension, or null if no extension.
This field is temporary and may go away.
9. winners_show:
8. winners_show:
A JSON boolean indicating of the file is listed on `winners.html` or not.
@@ -452,7 +447,7 @@ This file as the following fields:
NOTE: When winners_show is false, display_via MUST be null.
10. display_via:
9. display_via:
A string indicating how the file is to be displayed from `winners.html`.
Possible files include:
@@ -468,11 +463,16 @@ This file as the following fields:
NOTE: When display_via is null, winners_show MUST be false.
11. winners_text:
10. winners_text:
Any text that should be displayed at the end of line in `winners.html`
(with a preceding " - "), or null is no such text is to be displayed.
11. ext:
This ending filename extension, or null if no extension.
This field is not used.
The 11 field names in [manifest.numbers](manifest.numbers), must
match the JSON member names found in
[example.dot_winner.json](example.dot_winner.json).
+16 -17
View File
@@ -1,8 +1,7 @@
{
"no_comment" : "mandatory comment: because comments were removed from the original JSON spec",
"winner_JSON_format_version" : "0.4 2023-07-31",
"winner_JSON_format_version" : "0.5 2023-11-04",
"award" : "Award title",
"IOCCC_contest" : "IOCCC28",
"year" : "2024",
"dir" : "dirname",
"winner_id" : "2024_dirname",
@@ -13,8 +12,8 @@
],
"manifest" : [
{
"file_path" : "index.html",
"winners_rank" : 10,
"path" : "index.html",
"created_by" : "readme2index",
"prog" : null,
"filetype" : "html",
@@ -23,8 +22,8 @@
"winners_text" : "click here first"
},
{
"file_path" : "prog.c",
"winners_rank" : 20,
"path" : "prog.c",
"created_by" : null,
"prog" : "main",
"filetype" : "c",
@@ -33,8 +32,8 @@
"winners_text" : "winning source"
},
{
"file_path" : "Makefile",
"winners_rank" : 30,
"path" : "Makefile",
"created_by" : null,
"prog" : null,
"filetype" : "makefile",
@@ -43,8 +42,8 @@
"winners_text" : "how to compile"
},
{
"file_path" : "prog.alt.c",
"winners_rank" : 40,
"path" : "prog.alt.c",
"created_by" : null,
"prog" : "alt",
"filetype" : "c",
@@ -53,8 +52,8 @@
"winners_text" : "alternative source"
},
{
"file_path" : "prog.orig.c",
"winners_rank" : 50,
"path" : "prog.orig.c",
"created_by" : null,
"prog" : "orig",
"filetype" : "c",
@@ -63,8 +62,8 @@
"winners_text" : "original source"
},
{
"file_path" : "chocolate_cake.jpg",
"winners_rank" : 100,
"path" : "chocolate_cake.jpg",
"created_by" : null,
"prog" : null,
"filetype" : "image",
@@ -73,8 +72,8 @@
"winners_text" : "required argument file"
},
{
"file_path" : "magic.txt",
"winners_rank" : 150,
"path" : "magic.txt",
"created_by" : null,
"filetype" : "text",
"prog" : null,
@@ -83,8 +82,8 @@
"winners_text" : "data file"
},
{
"file_path" : "special.src",
"winners_rank" : 150,
"path" : "special.src",
"created_by" : null,
"filetype" : "text",
"prog" : null,
@@ -93,8 +92,8 @@
"winners_text" : "special language source code"
},
{
"file_path" : "raw_data.file",
"winners_rank" : 180,
"path" : "raw_data.file",
"created_by" : null,
"prog" : null,
"filetype" : "data",
@@ -103,8 +102,8 @@
"winners_text" : "optional argument file"
},
{
"file_path" : "spoiler.html",
"winners_rank" : 200,
"path" : "spoiler.html",
"created_by" : "md2html",
"prog" : null,
"filetype" : "html",
@@ -113,8 +112,8 @@
"winners_text" : "SPOILER WARNING"
},
{
"file_path" : "2024_dirname.tar.bz2",
"winners_rank" : 300,
"path" : "2024_dirname.tar.bz2",
"created_by" : "mkwinnertbz2",
"prog" : null,
"filetype" : "tbz2",
@@ -123,8 +122,8 @@
"winners_text" : "download winning source"
},
{
"file_path" : ".inventory.html",
"winners_rank" : 900,
"path" : ".inventory.html",
"created_by" : "winner2nventory",
"prog" : "orig",
"filetype" : "c",
@@ -133,8 +132,8 @@
"winners_text" : "original source"
},
{
"file_path" : ".gitignore",
"winners_rank" : null,
"path" : ".gitignore",
"created_by" : null,
"prog" : null,
"filetype" : "gitignore",
@@ -143,8 +142,8 @@
"winners_text" : null
},
{
"file_path" : ".winner.json",
"winners_rank" : null,
"path" : ".winner.json",
"created_by" : "jwinner",
"prog" : null,
"filetype" : "json",
@@ -153,8 +152,8 @@
"winners_text" : null
},
{
"file_path" : "README.md",
"winners_rank" : null,
"path" : "README.md",
"created_by" : null,
"prog" : null,
"filetype" : "markdown",
+1 -1
View File
@@ -226,7 +226,7 @@ cat > "$TMP_FILE" << EOF
</html>
EOF
# update index.html if needed
# update .inventory.html if needed
#
if ! cmp -s "$TMP_FILE" "$INVENTORY_PATH"; then
+5 -5
View File
@@ -53,10 +53,10 @@ fi
# sort manifest CSV file
#
sort -t, -k1,1 -k2d,2 -k3g,3 -k4d,10 "$TMP_CSV" -o "$TMP_CSV"
sort -t, -k1,1 -k2d,2 -k4g,4 -k3d,3 -k5d,10 "$TMP_CSV" -o "$TMP_CSV"
status="$?"
if [[ $status -ne 0 ]]; then
printf "$0: ERROR: sort -t, -k1,1 -k2d,2 -k3g,3 -k4d,10 %s -o %s failed, error: %s\n" "$TMP_CSV" "$TMP_CSV" "$status" 1>&2
printf "$0: ERROR: sort -t, -k1,1 -k2d,2 -k4g,4 -k3d,3 -k5d,10 %s -o %s failed, error: %s\n" "$TMP_CSV" "$TMP_CSV" "$status" 1>&2
exit 15
fi
@@ -97,7 +97,7 @@ fi
TMP_CSV="tmp.$$.$MANIFEST_CSV"
sed -e '/^# -/d' "$MANIFEST_CSV" |
sort -u |
sort -t, -k1,1 -k2d,2 -k3g,3 -k4d,10 > "$TMP_CSV"
sort -t, -k1,1 -k2d,2 -k4g,4 -k3d,3 -k5d,10 > "$TMP_CSV"
if [[ ! -s $TMP_CSV ]]; then
echo "$0: ERROR: sorted $MANIFEST_CSV is empty" 1>&2
exit 18
@@ -130,7 +130,7 @@ fi
export REQUIRED_PATH_LIST="path_list.required.txt"
export TMP_FILE="tmp.$$.$REQUIRED_PATH_LIST"
trap 'rm -f $TMP_FILE; exit' 0 1 2 3 15
awk -F, '$1 !~ "^#" && $5 == "null" { print $1 "/" $2 "/" $4; }' "$MANIFEST_CSV" | sort -t/ > "$TMP_FILE"
awk -F, '$1 !~ "^#" && $5 == "null" { print $1 "/" $2 "/" $3; }' "$MANIFEST_CSV" | sort -t/ > "$TMP_FILE"
if [[ ! -s $TMP_FILE ]]; then
echo "$0: ERROR: TMP_FILE, for required file list, is empty: $TMP_CSV" 1>&2
exit 21
@@ -163,7 +163,7 @@ fi
export BUILT_PATH_LIST="path_list.built.txt"
export TMP_FILE="tmp.$$.$BUILT_PATH_LIST"
trap 'rm -f $TMP_FILE; exit' 0 1 2 3 15
awk -F, '$1 !~ "^#" && $5 != "null" { print $1 "/" $2 "/" $4; }' "$MANIFEST_CSV" | sort -t/ > "$TMP_FILE"
awk -F, '$1 !~ "^#" && $5 != "null" { print $1 "/" $2 "/" $3; }' "$MANIFEST_CSV" | sort -t/ > "$TMP_FILE"
if [[ ! -s $TMP_FILE ]]; then
echo "$0: ERROR: TMP_FILE, for built file list, is empty: $TMP_CSV" 1>&2
exit 24
+4187 -4187
View File
File diff suppressed because it is too large. Load diff
Binary file not shown.