OSF import mapping #2

Closed
opened 2026-10-06 03:55:51 +00:00 by crowmaki · 1 comment
Owner

Part of #1

Question

How does the owner's OSF dialect (see scratch/sample.osf) map to Scenes, Lines, Characters and Locations? Cover character extensions (V.O., O.S., SUBTITLE), parentheticals, dual dialogue, scene numbering and omitted scenes, transitions, Shot paragraphs, page ranges, and how stable Line IDs are minted when only scene headings carry d:id. Also cover how heading parsing produces Location names and Lighting hints.

Part of #1 ## Question How does the owner's OSF dialect (see `scratch/sample.osf`) map to Scenes, Lines, Characters and Locations? Cover character extensions (V.O., O.S., SUBTITLE), parentheticals, dual dialogue, scene numbering and omitted scenes, transitions, `Shot` paragraphs, page ranges, and how stable Line IDs are minted when only scene headings carry `d:id`. Also cover how heading parsing produces Location names and Lighting hints.
Author
Owner

Resolution

Grilled with the owner. Facts on OSF 4.0 encodings come from the osf-sdk OSF-4.0.xml sample and open-source parsers (Beat, Scrite, OpenDraft).

  1. Lines. Each action paragraph is one Line. Each dialogue block (cue + parentheticals + dialogue, kept in order) is one Line. Transitions and Shot paragraphs are also kept as Lines, of kind transition / shot, but only as text to read: they never count toward Characters, Shots or Performance. Transitions before the first heading attach to the first Scene.

  2. Shots cover whole Lines only. A Shot cannot start or end in the middle of a Line, and several Shots may cover the same Line. The Shot's description says which beat it shows.

  3. IDs. A Scene's ID is its d:id. A missing or duplicate d:id gets a new ID, with a warning. Lines get opaque ULIDs plus their position within the Scene. IDs are not derived from position or content.

  4. Characters are created only from dialogue cues: the cue with trailing parenthesized groups removed, upper-cased, with whitespace normalized. Characters who never speak are created by hand, from a text selection like Props. Characters can be merged: the absorbed Character's Lines move to the survivor, and its name is kept as an alias.

  5. Cue extensions are stored on the dialogue Line as one of V.O., O.S./O.C., SUBTITLE or other (raw text). CONT'D is dropped; Fade In generates it at render time anyway. SUBTITLE means the actor speaks another language and the script text is the subtitle. A SUBTITLE Line has two optional fields the user fills in by hand: spoken language and spoken text. The prompt composer uses the spoken text when present, and the Line is flagged while it is empty.

  6. Headings. The prefix (INT. / EXT. / INT./EXT. / I/E) is matched case-insensitively. The heading is split on scene_time_separator. The last segment is the time slug if it is a known slug, and everything between the prefix and the slug is the Location name. Names are upper-cased and whitespace-normalized for matching. INT and EXT of the same place are different Locations.

  7. Location folders (new term) group Locations for display only. They are one level deep, a Location is in at most one folder, and they have no effect on references, Lighting or prompts. On import, Locations that share a base name (the first segment, ignoring INT/EXT) go into the same folder automatically. A Location with no siblings gets no folder. The user can freely create, rename and delete folders and move Locations between them.

  8. Lighting comes from a per-project slug→Lighting table, editable by the user and seeded with defaults:

    • DAY / MORNING / AFTERNOON → Day
    • NIGHT / EVENING → Night
    • DAWN / DUSK / SUNRISE / SUNSET / MAGIC HOUR → Dawn/Dusk
    • CONTINUOUS / LATER / MOMENTS LATER / SAME → inherit from the previous Scene

    An unknown slug, or a relative slug on the first Scene, leaves Lighting empty and flags the Scene. Table edits never re-map Scenes that were already imported.

  9. Dual dialogue (dualdialogue="1" on the first cue's style; the next dialogue block is its partner) becomes two ordinary dialogue Lines that share a simultaneous group marker. Performance treats their timing as overlapping.

  10. Scene numbers. A locked number attribute on the heading is used as written, e.g. 12A. Otherwise Scenes are numbered by script order. Numbers are frozen at import and never renumbered, because Take names depend on them. An omitted Scene (heading text = omitted_text) stays as a Scene with the omitted flag, its number, and no Lines. It is hidden from production views.

  11. Everything else.

    • Each Line stores its page_number as text, so 2A works. A Line with no page number inherits the previous Line's page. A Scene's page range is derived from its Lines; there are no eighths.
    • The title page's Title / Author bookmarks fill the Project's title and author.
    • Inline formatting, revision marks and highlights are stripped to plain text. Soft line breaks are kept.
    • note= / synopsis= are kept as read-only text on the Line or Scene.
    • <lists>, <styles>, revision colors and empty paragraphs are ignored. The only setting read is scene_time_separator.
  12. Import behaviour. Import accepts only OSF 4.x (basestyle). Custom styles resolve through the basestyle chain. Otherwise import is lenient and turns problems into warnings. It writes straight into the Project and then shows a summary: counts, warnings, and flagged Scenes or Lines. Fixes happen afterwards through the normal editors (merge, Lighting, folders), not in a staged review.

Glossary updated in CONTEXT.md: Scene, Line, Location folder, and Location (INT/EXT are distinct).

## Resolution Grilled with the owner. Facts on OSF 4.0 encodings come from the osf-sdk `OSF-4.0.xml` sample and open-source parsers (Beat, Scrite, OpenDraft). 1. **Lines.** Each action paragraph is one Line. Each dialogue block (cue + parentheticals + dialogue, kept in order) is one Line. Transitions and `Shot` paragraphs are also kept as Lines, of kind `transition` / `shot`, but only as text to read: they never count toward Characters, Shots or Performance. Transitions before the first heading attach to the first Scene. 2. **Shots cover whole Lines only.** A Shot cannot start or end in the middle of a Line, and several Shots may cover the same Line. The Shot's description says which beat it shows. 3. **IDs.** A Scene's ID is its `d:id`. A missing or duplicate `d:id` gets a new ID, with a warning. Lines get opaque ULIDs plus their position within the Scene. IDs are not derived from position or content. 4. **Characters** are created only from dialogue cues: the cue with trailing parenthesized groups removed, upper-cased, with whitespace normalized. Characters who never speak are created by hand, from a text selection like Props. Characters can be **merged**: the absorbed Character's Lines move to the survivor, and its name is kept as an alias. 5. **Cue extensions** are stored on the dialogue Line as one of `V.O.`, `O.S./O.C.`, `SUBTITLE` or other (raw text). CONT'D is dropped; Fade In generates it at render time anyway. **SUBTITLE** means the actor speaks another language and the script text is the subtitle. A SUBTITLE Line has two optional fields the user fills in by hand: *spoken language* and *spoken text*. The prompt composer uses the spoken text when present, and the Line is flagged while it is empty. 6. **Headings.** The prefix (`INT.` / `EXT.` / `INT./EXT.` / `I/E`) is matched case-insensitively. The heading is split on `scene_time_separator`. The last segment is the time slug if it is a known slug, and everything between the prefix and the slug is the Location name. Names are upper-cased and whitespace-normalized for matching. INT and EXT of the same place are **different Locations**. 7. **Location folders** (new term) group Locations for display only. They are one level deep, a Location is in at most one folder, and they have no effect on references, Lighting or prompts. On import, Locations that share a base name (the first segment, ignoring INT/EXT) go into the same folder automatically. A Location with no siblings gets no folder. The user can freely create, rename and delete folders and move Locations between them. 8. **Lighting** comes from a per-project slug→Lighting table, editable by the user and seeded with defaults: - DAY / MORNING / AFTERNOON → Day - NIGHT / EVENING → Night - DAWN / DUSK / SUNRISE / SUNSET / MAGIC HOUR → Dawn/Dusk - CONTINUOUS / LATER / MOMENTS LATER / SAME → inherit from the previous Scene An unknown slug, or a relative slug on the first Scene, leaves Lighting empty and flags the Scene. Table edits never re-map Scenes that were already imported. 9. **Dual dialogue** (`dualdialogue="1"` on the first cue's style; the next dialogue block is its partner) becomes two ordinary dialogue Lines that share a *simultaneous* group marker. Performance treats their timing as overlapping. 10. **Scene numbers.** A locked `number` attribute on the heading is used as written, e.g. `12A`. Otherwise Scenes are numbered by script order. Numbers are frozen at import and never renumbered, because Take names depend on them. An **omitted** Scene (heading text = `omitted_text`) stays as a Scene with the omitted flag, its number, and no Lines. It is hidden from production views. 11. **Everything else.** - Each Line stores its `page_number` as text, so `2A` works. A Line with no page number inherits the previous Line's page. A Scene's page range is derived from its Lines; there are no eighths. - The title page's `Title` / `Author` bookmarks fill the Project's title and author. - Inline formatting, revision marks and highlights are stripped to plain text. Soft line breaks are kept. - `note=` / `synopsis=` are kept as read-only text on the Line or Scene. - `<lists>`, `<styles>`, revision colors and empty paragraphs are ignored. The only setting read is `scene_time_separator`. 12. **Import behaviour.** Import accepts only OSF 4.x (`basestyle`). Custom styles resolve through the `basestyle` chain. Otherwise import is lenient and turns problems into warnings. It writes straight into the Project and then shows a summary: counts, warnings, and flagged Scenes or Lines. Fixes happen afterwards through the normal editors (merge, Lighting, folders), not in a staged review. Glossary updated in `CONTEXT.md`: **Scene**, **Line**, **Location folder**, and Location (INT/EXT are distinct).
Sign in to join this conversation.
No description provided.