11 KiB
Rundown converter development plan
Status: design and task list prepared; sample-driven implementation has not started. User-facing scope is in Rundown converter.
Architecture
Planned workspace member: crates/rundown-converter/, with binaries
rundown-converter and rundown-converter-gui. These names are reserved by this
plan only; no empty crate or Cargo member is added during preparation.
Use the reporter's Rust/clap/eframe approach and optional desktop feature.
A Python prototype is optional for investigating a difficult format, not a
second maintained implementation.
The processing pipeline is:
source readers -> source tables -> header/column detection -> neutral rundown
-> timing resolution and validation -> Ontime adapter -> file
Readers retain original cell text, typed values, number formats, merged-cell ranges and source coordinates when available. A table model separates extraction from interpretation so format-specific quirks do not leak into the Ontime adapter. PDF extraction must retain page/position information and expose unreliable reading order; image-only documents must produce an actionable unsupported/extraction error until a tested reader exists. Never execute document macros or formulas. Missing or stale formula results require explicit handling.
Planned core modules cover readers, detection, neutral model, timing, diagnostics, export and orchestration. GUI and CLI are thin clients of the same core; neither contains independent parsing rules. Extract shared reporter UI utilities only when useful code reuse is demonstrated; do not couple the new model to videos, FFprobe, Typst or the reporter's sequential timer assumptions.
Neutral representation
Use a versioned serializable model independent of Ontime fields and units. Represent unresolved facts explicitly; validation produces an exportable model only when required decisions are resolved.
| Entity | Information to retain |
|---|---|
| Document | Source identity, reader, sheet/table choices, model version, interpretation settings |
| Source reference | File, sheet/page, row/cell or bounding region, original text |
| Rundown/session | Ordered entries, label, date/day context, stage/track where established |
| Entry | Stable identity, cue, title, speaker, notes, additional original columns, event/break/marker kind |
| Timing | Optional explicit start/end, duration, day offset, fixed/relative intent, inferred/resolved values |
| Gap | Known previous end and next start, interval, provenance, explicit or inferred classification |
| Decision | Selected mapping/rule, evidence, alternatives, user overrides |
| Diagnostic | Stable code, severity, source reference, explanation, corrective action |
Use integer time units, not floating-point arithmetic, for normalized durations and schedule calculations. Keep wall-clock times plus date/day offsets separate from elapsed durations. Preserve given and derived values so conflicts are reportable rather than overwritten. Convert to Ontime milliseconds only in the adapter. Stable identities should be reproducible for unchanged input; do not promise identity stability across arbitrary source edits.
Detection and clarification
Combine normalized French/English header aliases, cell types, number formats, value patterns and consistency across rows. Normalize accents, casing, spacing and line breaks without losing original text. Evaluate candidate header bands and mappings jointly instead of assigning columns from individual keywords.
Account for title blocks above tables, merged/multiline headers, repeated headers,
blank separators, continuation rows, section labels, footnotes and totals.
Account for clock forms such as 09:30/9h30, explicit units such as 15 min,
spreadsheet time serials, formula results, decimal commas and CSV delimiters.
An unlabelled 10:30 or bare 15 is not sufficient evidence for a time role/unit.
Formatting and keywords are evidence, not proof.
Calibrate acceptance thresholds and the separation between competing mappings against examples. Do not present heuristic scores as statistical probabilities. Report the winning evidence and meaningful alternatives. If required roles or row classifications remain ambiguous, block export; nonessential columns can remain preserved metadata with a warning. Never silently drop a possible cue.
Example diagnostic, with proposed wording:
AMBIGUOUS_TIME_COLUMN — Sheet “Jour 1”, C4:C28, header “Temps”
Values such as “10:30” could be start times or durations.
Clarify the header to “Début” or “Durée (mm:ss)”, or map column C and its units.
No Ontime file was written.
Mappings must be possible without modifying originals. CLI options/config and a GUI mapping panel should select table, header rows, column roles and units. Reusable mapping profiles should verify expected headers before applying; a changed document must not silently inherit an unsuitable profile.
Timing resolution and export contract
Apply the policies in the tool overview. Solve constraints within a session while preserving explicit anchors. An explicit start/end pair yields duration; a start/duration pair yields end. If all three are present, validate agreement using a documented precision tolerance.
Do not infer an end across an unknown break, another session, another day or a parallel track. Midnight rollover must be supported by evidence or an explicit setting. Treat unresolved overlap, negative duration, invalid time and unavailable final duration as actionable errors. Define zero-duration markers separately from missing-duration events. Never silently clamp or wrap unsupported target values.
The Ontime adapter will map absolute starts to independent schedule entries and link only entries explicitly intended to follow their predecessor. Duration-lock, end-lock and count-to-end playback are distinct choices: preserving a scheduled start must not silently enable count-to-end or automated playback. Keep default end actions manual. Validate target limits, ordering, grouping and project schema. An established gap remains empty by default; do not use a delay entry to represent an ordinary lunch break. If visible inferred break cues are implemented, label and track them separately from source events.
Export via a temporary file and publish only after complete validation, with explicit overwrite behavior and cleanup on errors/cancellation. Produce neutral JSON separately from native Ontime JSON with unmistakable filenames. Diagnostic preview may remain available on failure, but an invalid project must not be published. Keep local source paths out of exported project notes by default.
CLI and desktop experience
Proposed CLI operations are inspect, validate and convert; finalize syntax after
sample review. Support explicit output, sheet/table selection, mappings, units,
neutral JSON and overwrite. Provide useful progress, plain redirected logs,
NO_COLOR, documented exit codes and structured diagnostics for automation.
CLI operation must not depend on GUI availability or interactive prompts.
Match the reporter's compact egui layout, purple primary action, native file picker, drag/drop, recent inputs, output controls, Settings, fixed bottom progress and Cancel, scrollable content, and Results with Open/Open folder/Copy path. Add a Review pane for source samples, mappings and the resolved schedule; show anchored starts, inferred durations, breaks and blockers clearly. Keep controls usable in small windows and at larger text sizes. Conversion runs on a worker thread; controls reflect running/cancelled/completed states. Parsing and export errors must remain visible with direct corrective actions.
Ordered task list and acceptance gates
- Inspect existing CLI, GUI, Ontime export and repository documentation.
- Check official Ontime documentation for schedule gaps and import options.
- Specify neutral model, ambiguity policy, start-time priority and break rules.
- Add separate tool documentation and link it from the repository overview.
- Inventory supplied examples by format/layout; record intended interpretations and the user's Ontime version. Decide first-release input coverage from these.
- Build sanitized fixtures and an expected-result matrix before tuning rules. Include difficult examples and some held-out layouts to detect overfitting.
- Confirm a pinned Ontime schema/release and create a minimal import experiment with independent starts and a lunch gap; verify actual schedule and playback.
- Scaffold the Rust member, core model, optional GUI and CLI; retain reporter defaults. Include the new member in workspace CI, documentation and coverage.
- Implement the required source readers and extraction diagnostics. Test unsupported/encrypted/corrupt inputs and formula/merged-cell behavior as relevant.
- Implement detection, explicit mappings and source-located errors; verify competing headers and misleading time formats fail clearly.
- Implement timing constraints and gaps. Test known/unknown lunch gaps, start-only schedules, contradictory triples, missing final duration, overlaps, midnight/day transitions, zero-duration markers and multiple sessions/tracks.
- Implement inspect/validate/convert CLI and atomic exports. Test CLI status, output collisions, cancellation, source preservation and deterministic results.
- Implement the Ontime adapter and neutral JSON export. Check native imports against the pinned parser and manually inspect real Ontime behavior; don't rely solely on JSON snapshots. Verify that later anchors survive earlier edits and gaps remain visible in the schedule; document playback implications.
- Implement desktop Setup/Review/Results, mapping corrections and diagnostics. Verify GUI/CLI parity; manually inspect representative and ambiguous inputs, resized windows, larger text, long paths, progress and cancellation.
- Run the supported corpus end to end: each source cue must be represented or have an explicit reviewed exclusion; every unresolved ambiguity must block export.
- Complete usage examples, supported-format matrix, limitations and illustrated GUI instructions. Add runnable quick-start commands only once they exist.
- Run appropriate Python CI/packaging tests and all Rust gates listed in Development, plus whole-workspace coverage. Preserve production GUI coverage and reporter behavior. Record unavailable manual checks.
- Extend manual packaging/release preparation for both binaries and supported platforms, including only dependencies this tool needs. CI must not publish releases.
- Commit each completed implementation task with its validation summary.
Documentation conventions
Keep README as a short repository entry point with quick-start examples and links. Each tool has its own usage page; detailed design/task tracking stays separate. Use one H1 per page, sentence-case headings, fenced code with a language, ordinary relative Markdown links and consistent tables/lists. Label planned features and commands clearly. The existing illustrated guide remains explicitly scoped to the PPTX reporter; add a separate converter guide when a working GUI can be captured.