OSF import: Scenes and Lines (#27) #73

Merged
crowmaki merged 1 commit from issue-27-osf-scenes-lines into main 2026-10-07 09:57:41 +00:00
Owner

Closes #27. Part of #24.

Stacked PR. Review and merge in order: #26 → #27 → #28 → #29 → #30 → #31 → #32. Each PR targets the branch of the one before it.

What

  • OSF 4.x import (osf.rs parser, script_import.rs writer). Migration V2 adds script, scene and line.
  • Styles resolve through basestyle. Empty paragraphs, lists and other settings are ignored. Inline formatting is stripped and soft breaks are kept.
  • One Line per action paragraph or dialogue block. Transitions and shots are read-only Lines, and a trigger makes Line positions immutable.
  • d:id is a unique column, and a missing or duplicate one gets a new id with a warning. Locked numbers are used as written. Unlocked Scenes continue counting above the last locked number (confirmed with the owner). Omitted Scenes stay as placeholders without Lines.
  • Pages are stored as text per Line, and Scene ranges are derived. Title and author come from the title page. Notes and synopses are kept.
  • Import is not undoable. It reports progress over a Tauri Channel, runs on spawn_blocking, refuses a second import, and returns a summary.
  • UI: Import script… with progress, the summary, and a read-only script view.

Tests

tests/script_import.rs. The sample-script test reads scratch/sample.osf and skips if the file is absent.

Checks

  • cargo test --workspace --all-features, cargo clippy --workspace --all-targets --all-features -- -D warnings and bun run check pass.
  • The Svelte UI is type-checked only. It has not been run in the app.
Closes #27. Part of #24. > **Stacked PR.** Review and merge in order: #26 → #27 → #28 → #29 → #30 → #31 → #32. Each PR targets the branch of the one before it. ## What - OSF 4.x import (`osf.rs` parser, `script_import.rs` writer). Migration V2 adds `script`, `scene` and `line`. - Styles resolve through `basestyle`. Empty paragraphs, lists and other settings are ignored. Inline formatting is stripped and soft breaks are kept. - One Line per action paragraph or dialogue block. Transitions and shots are read-only Lines, and a trigger makes Line positions immutable. - `d:id` is a unique column, and a missing or duplicate one gets a new id with a warning. Locked numbers are used as written. Unlocked Scenes continue counting above the last locked number (confirmed with the owner). Omitted Scenes stay as placeholders without Lines. - Pages are stored as text per Line, and Scene ranges are derived. Title and author come from the title page. Notes and synopses are kept. - Import is not undoable. It reports progress over a Tauri `Channel`, runs on `spawn_blocking`, refuses a second import, and returns a summary. - UI: Import script… with progress, the summary, and a read-only script view. ## Tests `tests/script_import.rs`. The sample-script test reads `scratch/sample.osf` and skips if the file is absent. ## Checks - `cargo test --workspace --all-features`, `cargo clippy --workspace --all-targets --all-features -- -D warnings` and `bun run check` pass. - The Svelte UI is type-checked only. It has not been run in the app.
Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
crowmaki changed target branch from issue-26-undo-multi-window to main 2026-10-07 09:57:02 +00:00
crowmaki deleted branch issue-27-osf-scenes-lines 2026-10-07 09:57:41 +00:00
Sign in to join this conversation.
No description provided.