Repository navigation
First pre-release version
Pre-release
Pre-release
[0.9.0] - 2026-10-16
Added
PROJECT_PLAN.md: initial project plan (parsers, scene/chunk logic, character bible,
multi-mode H3 support, web wizard, milestones).H3_Prompting_Docs/: local copies of the official Minimax H3 prompting guides
(Text-and-Keyframe + Reference modes) used as the authoritative prompt spec.- Scaffolding:
script2prompt/package (parsers/core/app stubs),pyproject.toml,
config.toml,tests/(stdlib unittest),samples/sample_scene.txt. script2prompt/core/config.py: stdlibtomllibloader withconfig.local.toml
andOPENAI_BASE_URL/S2P_MODELenv overrides.script2prompt/core/llm.py: stdliburllibchat-completions client (noopenaiSDK).- Milestone 1 (offline core, T2VA): plain-text heuristic and Fountain-subset parsers
(headings, cues with(O.S.)extensions, dialogue blocks, parentheticals,
transitions); scene splitter with slugline context carry-over; character bible
(speaker IDs in first-vocalization order, descriptions fromNAME (traits)
action intros,NoneIDs for non-vocal characters); chunker (duration estimate,
greedy pack to target, <=10s, <=3 shots,MM:SS.mmmstamps, long-monologue
split with<scenetrans>markers); deterministic T2VA template builder
(core/fallback.pyviacore/h3_builder.py); T2VA validator (fields, shots,
timestamps,<d>tags, soundscape/music budgets, 7000-char cap);
core/modes.pyinstruction lines for all modes. 22 stdlibunittesttests,
including end-to-end onsamples/sample_scene.txt. - T2VA template restyled to the real-example layout (
Example_Text2Video_Prompt.txt):
field labels on their own lines, standalone style sentence opening the body,
dialogue asName (S1) says <d>[Lang]words</d>.(no colon, no space after the
language tag, period outside</d>). Conventions recorded inAGENTS.mdand
PROJECT_PLAN.md§2.1. - Milestone 2 (keyframe modes): mode-specific
[Shot 1]openings and landing
sentences for I2VA (anchor<Picture 1>forward), FL2VA (single-shot path
from Picture 1 to Picture 2) and L2VA (converge on<Picture 1>in the final
shot);chunk()takesmodeand forces single-shot chunks for FL2VA;
validator checks instruction lines (without counting[Shot N]inside them),
the blank line, and flags multi-shot FL2VA;modes.pygains section schemas. - Milestone 4 (LLM wiring):
core/prompts.pywith per-mode system prompts for
all five modes (system_prompt(), shared H3 rules + mode specifics);
core/llm.pygainsmessages()(system prompt + structured chunk/bible brief,
exact instruction line, R2V reference slots) and a workingrewrite()with an
injectablechat_fn;h3_builder.build(..., rewrite=...)uses the LLM when it
returns non-empty text and falls back to the deterministic templates on error
or empty output. 15 new tests (52 total), including a stdlib fake
OpenAI-compatible server exercisingchatround-trip and liverewrite. - Milestone 5 (FDX + PDF parsers):
parsers/fdx.pymaps Final Draft
<Paragraph Type=...>XML (via stdlibxml.etree) to elements, joining
<Text>runs, reading only the script<Content>(title page ignored),
skipping unknown types, and including dual-dialogue;parsers/pdf.py
extracts text with lazily-importedpypdfand delegates to the plain-text
parser (missing-extra error names.[pdf]);parsers/__init__.pyadds
parse_file(path)suffix dispatch. 8 new tests (60 total). - Milestone 6 (wizard + export):
core/pipeline.pyend-to-end glue
(parse_bytes,run,characters_markdown,prompts_markdown,manifest,
reference_manifest,export_pack,write_pack); mode-aware reference
slots (ref_manifest.picture_slotsfor I2VA/FL2VA/L2VA);app/web.py
Streamlit wizard (upload → mode/settings → editable bible → generate/export;
lazystreamlitimport) andscript2prompt/__main__.pyCLI
(python -m script2prompt SCRIPT, templates by default,--llmopt-in);
samples/one_page.txt1-page sample. 11 new tests (71 total) covering all
five modes end-to-end plus export pack and CLI.
Fixed
- Audit fixes: character bible no longer absorbs one-off ALL-CAPS words (TV/DAY/OK);
bare action mentions join only on second mention, cue/intro names always join.
Over-long single sentences now hard-split inside monologue chunking.
requires-pythoncorrected to>=3.11(tomllib); removed dead
[tool.unittest]config;PROJECT_PLAN.mdno longer mentionspdfplumber. - Milestone 3 (R2V full-reference):
core/ref_manifest.pyproposes per-chunk
Subject/Audio slots (Subject 1 environment, characters in bible order, one
voice-timbre<Audio N>per speaker; pictures/videos empty placeholders);
core/r2v.pybuilds the 6-section template with task-type prefix, valid
retention markers, shot lists, and<Subject N> (Sx)speaker heads (no IDs in
retention); validator checks section order, markers, task-type prefix, and
true label definitions (line-start only). 7 new tests, 37 total. - Audit fixes (R2V): numeric audio ordering (
S10no longer sorts beforeS2);
R2V[Shot 1]opening gains its missing camera sentence. - Deep-audit hardening pass (B1–B13, B15 in
IMPROVEMENTS.md). Chunker keeps a
character cue atomic with its dialogue and re-emits the cue before split
monologue continuations, so speaker IDs are never lost ("unseen speaker");
the monologue threshold is derived from the 10s cap. Voiceover detection now
reads extension and delivery independently (V.O. + parenthetical works) and no
longer treats O.S./O.C. as voiceover. Plain-text parser: stricter sluglines
(rejectsEXT.-led dialogue, accepts mixed-case- TIME, recognizesEST.),
FADE IN/FADE OUT/SMASH CUTtransitions, and cue lookahead so lone
ALL-CAPS action beats are not characters. Character traits are captured
mid-line (with a traits-like guard). CLI honors--duration 0; malformed
config.tomlraises a friendlyValueError; binary inputs are rejected;
validator cross-checks speaker IDs against the bible and flags unseen
speakers;h3_builder.buildrejects scene dicts. 19 new regression tests
(tests/test_hardening.py), 90 total.
Changed
- Dependency policy: project-local
.venv/only (git-ignored); zero required
third-party deps for core (stdlibdataclasses,tomllib,urllib,unittest,
xml.etree). Optionals are lazy-imported:pdf(pypdf, used byparsers/pdf.py
only) andweb(streamlit, used byapp/web.pyonly). Droppedpydantic,
pyyaml,openaiSDK,pytest,pdfplumber,fastapi/uvicorn.
SeePROJECT_PLAN.md§3.2. - Config format
config.yaml→config.toml(stdlibtomllib).
PROJECT_PLAN.mddocuments the dependency use policy (§3.2).