dictionary
Tool
tools/triage/dictionary.py(program, Triage). Check a project's data dictionary (labels/dictionary.tsv) and print it as a table.
Run it with ./gameframe run dictionary ARGS or python3 tools/triage/dictionary.py. Source on GitHub.
Its own help
This is the help text in the tool itself, as ./gameframe tool dictionary prints it.
text
Check a project's data dictionary (labels/dictionary.tsv) and print it as a table.
Usage: dictionary.py [FILE] [--fields labels/fields.tsv] [--strict] [--markdown]
The data dictionary has one row per value the game's rules use, with ten tab-separated columns:
name, where, type, kind, unit, range, meaning, written by, read by, evidence. GameFrame's
docs/DATA-DICTIONARY.md describes each column, and docs/TAXONOMIES.md lists the kinds. Lines
that start with # are comments. FILE defaults to labels/dictionary.tsv.
Errors (the exit status is 1):
- a row without ten columns, or without a name;
- a `where` that is not one of the forms: Struct+0x0c, 0x14002f000, export NAME,
file:NAME+OFFSET, save:BLOCK+OFFSET, msg:NAME+OFFSET, script:NAME;
- a `kind` that is not one of the kinds of values;
- an `evidence` that does not start with observed, measured, inferred or unknown;
- the same name and place in two rows.
Warnings (an error with --strict):
- an empty unit, range or meaning (write - when there is none);
- with --fields, a Struct+0x0c row whose structure and offset are not in fields.tsv, or whose
type differs from the type there.
With --fields, the tool also counts the fields in fields.tsv that have no row yet.
--markdown prints the rows as a Markdown table, sorted by name, for a findings document.
Standard library only.Named by
Skills: re-land.