muvid.script¶
Script (screenplay) markdown ↔ ShotSpec list.
The script is a human-friendly markdown anchored to the song timeline.
Each ### header introduces a shot with a header line of the form:
### <id> | <start>-<end> | <strategy>
Then optional **key**: value lines (env, chars, camera,
framing) followed by a free-form prose description block. Sections
are introduced by ## [<label>] <start> → <end> headers but are
optional (the project-level sections list is the SSOT for those).
The parse is intentionally lenient — we ignore anything we don’t understand — so the agent can write the file and the user can edit it without learning a strict grammar.
Functions
|
Parse |
|
Parse a script markdown string into (sections, shots). |
|
Inverse of |
|
Render the project's current sections+shots to |
- muvid.script.parse_and_apply(project, *, path=None)[source]¶
Parse
script/script.mdand upsert any sections/shots it defines.Existing sections/shots not present in the script are left alone.
- Return type:
- muvid.script.parse_script(md)[source]¶
Parse a script markdown string into (sections, shots).
Sections are returned only when explicitly headed with
## [label]; otherwise it’s an empty list and you should rely on the project’s section list separately.- Return type:
tuple[list[SectionSpec],list[ShotSpec]]