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 种现成风格,也能做出你自己的

459 B
Raw Blame
# export cues.json from the VO subtitle ranges in story.js (same data as the burned-in subtitles)
import re, json, os
D = 'styles/one-line/demo'
src = open(os.path.join(D, 'story.js')).read()
cues = []
for m in re.finditer(r"text: '([^']+)'.*?sub: \[([\d.]+), ([\d.]+)\]", src):
    cues.append({'t0': float(m.group(2)), 't1': float(m.group(3)), 'text': m.group(1)})
json.dump(cues, open(os.path.join(D, 'cues.json'), 'w'), indent=1)
print(len(cues), 'cues')