Repository navigation
Engine v2.14
·
106 commits
to main
since this release
Long caption lines show as short pieces, on the page and in export.py's .srt. Sync with python3 .claude/skills/papermorph/scripts/engine.py site.
Caption cues of 70–120 characters (one sentence each) were too long for children to read in time. A cue wider than 42 characters (a Chinese, Japanese or Korean character counts two) now shows as short pieces.
- A cue is cut at the clause mark nearest its middle, else (when over by more than a fifth) at the space nearest it, else between two Chinese or Japanese characters; never inside an expression, beside a sign or inside short brackets (
f(x, y)), and never leaving a piece under a quarter of the limit. - An author's direction mark (U+200E/U+200F) goes on every piece; a line with no place to cut shows whole and the console names it.
- A piece starts at its share of the cue's characters along the cue's time (
timings.jsholds no word times; within about 0.3 s in the Apollo 13 film). ENGINE.captionCues(id)feeds the page andexport.py's .srt alike;TIMINGSkeeps the voice script's whole sentences.export.pywarns once and keeps whole sentences on a page whose engine is older.check_i18n.py's caption check covers English, Chinese, Japanese, Arabic with maths, marked lines and direction marks.