Expand description
The timeline editor’s JSON routes, with the contracts of
_register_sfx_routes in xil_gui.py, plus two routes of our own for
the Timeline’s dialogue-edit modal:
GET /xil/get-sfx?slug=&tag=&key=→{effect, defaults, natural_s}POST /xil/update-sfx→ sets or clears one cue’s four sound fieldsPOST /xil/update-sfx-defaults→ sets or clears one layer’s defaultsGET /xil/get-parsed-entry?slug=&tag=&seq=→{speaker, text, speakers}POST /xil/update-parsed-entry→{slug, tag, seq, speaker, text}
Every save rewrites sfx_{tag}.json and appends to its _edits.jsonl
journal; a journal failure never fails the save. The two parsed-entry
routes are a thin JSON front end over crate::entries, which the
dashboard’s Dialogue sub-tab also calls — one shared save, two callers.
Constants§
Functions§
- body_
repr 🔒 - Python’s
repr()of a JSON request body, for the debug log. - body_
str 🔒 - get_
parsed_ entry GET /xil/get-parsed-entry?slug=&tag=&seq=: the Timeline modal’s one fetch to open — the entry’s current fields plus the speaker dropdown options, so no second round trip is needed.- get_sfx
GET /xil/get-sfx.- read_
config 🔒 - reply 🔒
- sfx_
config_ 🔒path - The episode’s sfx config, or the error response to send instead.
- source_
duration_ 🔒s _source_duration_s(source): a cue’s source file length, orNonefor a generated cue or an unreadable file. Relative sources are workspace paths.- speakers_
json 🔒 - update_
parsed_ entry POST /xil/update-parsed-entry:{slug, tag, seq, speaker, text}→ the same validate/save/journal pathentries::save_entryruns for the dashboard’s Dialogue sub-tab.- update_
sfx POST /xil/update-sfx.- update_
sfx_ defaults POST /xil/update-sfx-defaults: the{layer}_{field}defaults.- write_
config 🔒