Skip to main content

Crate xil_core

Crate xil_core 

Source
Expand description

Shared core for the xil pipeline: workspace layout, slug/path derivation, config models, the SFX edit journal, and logging.

Mirrors models.py and log_config.py from the Python package. Where the Python does something odd (resolving symlinks, creating an empty log file at startup), this crate does the same odd thing on purpose — the parity harness compares the two byte for byte.

Modules§

banner
Start/finish frame around a command run. Port of sfx_common.run_banner.
fsutil
os.path / glob behaviours the commands lean on.
journal
Edit journals: sfx_<tag>_edits.jsonl beside each SFX config, and parsed_<tag>_edits.jsonl beside each parsed script.
log
Two sinks, two formats — port of log_config.py.
pycsv
csv.writer / csv.DictWriter the way CPython writes them.
pyfmt
Python number and string formatting corners that show up in console output: round(x, n), f"{x:.1f}", width padding by character count, s[:n] slicing, and html.escape.
pyjson
json.dumps the way CPython writes it, so files and stdout compare byte for byte with the Python pipeline.
script
Script parsing: the markdown production script → structured entries. Port of XILP001_script_parser.py’s library half.
sfxlib
Shared SFX library naming — the text half of sfx_common.py.
stems
Stem filename conventions, shared by the migrator, the cleanup pass and (later) the mixer. Port of the naming helpers in mix_common.py and XILP007_stem_migrator.py.
textsim
Python’s difflib — Ratcliff/Obershelp similarity and get_close_matches.
workspace
Workspace root, show slug, active show, and the two on-disk layouts.