Skip to main content

Module journal

Module journal 

Source
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", no key).
append_sfx_edit
Append one per-cue edit record. None values 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 of sfx_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.