Skip to content

A toolbox of film styles made in code for Claude Code: 66 ready to use, and your own. Each style is a style prompt plus a demo film made entirely in code by Claude Opus 5.5, with no video model. By Lemomo. · 一套用代码做片的风格工具箱:66 种现成风格,也能做出你自己的

831 B
Raw Blame
"""Subtitle cues → ../woodcut.srt (same rule as film.js: t0 = narration start − 0.05, on screen ≥ max(1.8 s, speech + 0.6 s))"""
import json, os, subprocess, sys
D = os.path.dirname(os.path.dirname(os.path.abspath(__file__))); R = os.path.abspath(os.path.join(D, '../../..'))
K = json.load(open(os.path.join(D, 'timeline.json')))['keys']; dur = json.load(open(os.path.join(D, 'voices/dur.json')))
cues = [{'t0': round(K[l['id']] - .05, 3), 't1': round(K[l['id']] + max(1.8, dur[l['id']] + .6), 3), 'text': l['text']} for l in json.load(open(os.path.join(D, 'lines.json')))]
os.makedirs(os.path.join(D, 'out'), exist_ok=True); p = os.path.join(D, 'out/srt.json'); json.dump(cues, open(p, 'w'), indent=1)
subprocess.run([sys.executable, os.path.join(R, 'core/render/srt.py'), p, os.path.join(D, '../woodcut.srt')], check=True)