Expand description
Edit journals: sfx_<tag>_edits.jsonl beside each SFX config, and
parsed_<tag>_edits.jsonl beside each parsed script.
The timeline editor appends one SFX record per save. A fresh skeleton
from xil parse wipes hand-tuned overrides, so the journal is replayed
on top to bring them back. Port of the journal half of sfx_common.py.
The dialogue journal (GUI dialogue-line editor) follows the same
append-only shape but is not replayed automatically on re-parse: SFX cue
keys are stable names, while a dialogue line’s seq can shift if the
script is restructured, which makes blind seq-based replay riskier.
Structs§
- Replay
- Outcome of a replay: how many records were applied, and which keys did not exist in the config (a renamed direction leaves a harmless orphan).
Constants§
- SFX_
EDIT_ FIELDS - Fields the timeline editor may set on one cue. Anything else in a record is ignored on replay.
Functions§
- append_
dialogue_ edit - Append one dialogue-line edit record:
{ts, seq, fields: {speaker, text}}. Unlike the SFX journal, both fields are always set — a dialogue line has no “clear this override” state. - append_
record 🔒 - append_
sfx_ defaults_ edit - Append one category-defaults record (
scope: "defaults", nokey). - append_
sfx_ edit - Append one per-cue edit record.
Nonevalues mean “clear this override” and are preserved as JSON null so replay reproduces the save. - dialogue_
edits_ path parsed_X.json→parsed_X_edits.jsonl— the dialogue-editor sibling ofsfx_edits_path, same stem-swap logic.- replay_
sfx_ edits - Reapply the journal onto the config at
sfx_path, in journal order (last write wins).(0, [])when no journal exists. - sfx_
edits_ path sfx_X.json→sfx_X_edits.jsonl.- utc_now 🔒
datetime.now(UTC).isoformat(timespec="seconds")—2026-09-11T18:30:00+00:00.