Expand description
xil parse — production script markdown → structured JSON, plus the
cast and SFX config skeletons. Port of XILP001_script_parser.py’s CLI.
Structs§
- Args 🔒
Constants§
Statics§
Functions§
- apply_
sfx_ 🔒overrides - Apply attribute hints to one effect entry, in place. A
play_durationhint clearsduration_secondson source-backed cues — the two are mutually exclusive and the skeleton default would contradict the hint. - backfill_
sfx_ 🔒sources - Fill missing
sourcefields on an existing SFX config from parsed hints. - command
- The clap definition behind
--help, for man pages. - commas 🔒
f"{n:,}"— thousands separators.- default_
duration 🔒 - Default generation length by cue category.
- defaults_
block 🔒 - docs_
block 🔒 - entry_
overrides 🔒 - Overrides carried on a parsed direction entry, as the JSON holds them.
- execute 🔒
- generate_
cast_ 🔒config - Write the cast skeleton: one entry per speaker found in the script.
- generate_
sfx_ 🔒config - Write the SFX skeleton: one entry per unique direction.
- hint_
target_ 🔒exists - Does a hint’s
SFX/...path resolve on disk? Guards forced replacement: plenty of working sources are bareSFX/<file>with no slug-form twin. - join_
strs 🔒 - json_
f64 🔒 - or_
default 🔒 x or default— a null, empty string or absent value takes the default.- print_
dialogue_ 🔒preview - print_
speaker_ 🔒stats - print_
summary 🔒 - run
- run_
parse 🔒 - Parse the file at
pathwith the project fallbacks applied. - title_
case 🔒 - Python
str.title(): first letter of each run of letters uppercased. - truncate 🔒
- with_
extension_ 🔒csv os.path.splitext(p)[0] + ".csv".- write_
debug_ 🔒csv - write_
json_ 🔒no_ newline - Both skeleton writers use
json.dumpwith no trailing newline.