Skip to main content

Module entries

Module entries 

Source
Expand description

The Dialogue sub-tab and the Timeline’s dialogue-edit modal: read, search and edit one dialogue line’s speaker and text in parsed/{slug}/parsed_{tag}.json.

Both surfaces call save_entry — there is exactly one place that mutates a dialogue line. Scope is deliberately narrow: only entries with "type": "dialogue" can be edited here; sound cues, scene headers and everything else stay the Raw JSON tab’s job.

Structs§

DialogueRow
One dialogue row, as surfaced to either editor.

Functions§

backup_path 🔒
{name}.bak beside the file, matching crate::parsed::save’s scheme.
get_entry
One dialogue entry’s current speaker/text, or why not (unknown seq, or the seq is not a dialogue line).
is_dialogue 🔒
keep_latest 🔒
The most recent value per key, comparing later entries as they arrive. ts/generated_at are both %Y-%m-%dT%H:%M:%S+00:00, fixed-width and always UTC, so plain string comparison sorts them chronologically — no need to parse them as dates.
list_dialogue
Dialogue rows matching q (a case-insensitive substring of speaker or text), paginated. (this page's rows, total matches). (empty, 0) when the episode has no parsed file yet.
load_entries 🔒
path_for
(slug, tag) → the parsed JSON path, jailed — the slug/tag-keyed sibling of crate::parsed::parsed_path, for callers that already have (slug, tag) (the Timeline’s JS globals) instead of an Episode-dropdown label.
pending_reprocess
Sequence numbers whose dialogue was edited after that seq’s stem was last produced — “changed since last produce”. Empty when nothing is pending, the episode has never been produced (no stem manifest yet), or no dialogue journal exists.
row_of 🔒
save_entry
Validate, mutate, recompute stats, back up and write — the one save both the dashboard’s Dialogue tab and the Timeline’s dialogue modal call.
speaker_choices
configs/<slug>/speakers.json (legacy fallback: the workspace root), as dropdown-ready (label, key) pairs in the file’s own order. Empty when no speakers file exists yet for this show — callers then accept any speaker key rather than blocking the editor on a file that hasn’t been authored.