anbeime/skill / skills/srt-whiteboard-animation
srt-whiteboard-animation
Verified将 SRT 字幕做成暖米黄纸张底的白板手绘动画:读字幕→输出配图策略→确认后生成统一风格线稿→按叙事语义标注分区→预览台调整→渲染 MP4。编排沿用分区遮罩揭示(annotation.json / sequence / startMs / protectedRegions),但每个区域内的落墨换成 stream 的连续笔迹(骨架/网格 ink→color)。当用户提供 SRT 字幕并要求"字幕做成白板手绘/流式笔迹视频""SRT 生成白板动画""按字幕分镜画手绘"时触发。
| File | Kind | Size |
|---|---|---|
| .gitignore | other | 211 B |
| LICENSE | other | 1.0 KB |
| README.md | markdown | 6.2 KB |
| SKILL.md | skill md | 13.8 KB |
| agents/openai.yaml | config | 245 B |
| assets/drawing-hand.png | binary | 784.0 KB |
| assets/preview.html | other | 27.7 KB |
| examples/scene-01-monkey-mountain-banana-whiteboard.gif | binary | 1.7 MB |
| examples/scene-01-monkey-mountain-banana-whiteboard.mp4 | binary | 1.1 MB |
| examples/scene-01-monkey-mountain-banana.annotation.json | config | 1.8 KB |
| examples/scene-01-monkey-mountain-banana.png | binary | 2.3 MB |
| examples/scene-01-monkey-mountain-stream.gif | binary | 5.1 MB |
| examples/scene-01-monkey-mountain.png | binary | 1.2 MB |
| scripts/merge_scenes.py | script | 3.8 KB |
| scripts/parse_srt.py | script | 4.9 KB |
| scripts/prepare_env.py | script | 2.9 KB |
| scripts/render_annotation_preview.py | script | 1.9 KB |
| scripts/render_stream_whiteboard.py | script | 24.8 KB |
| scripts/stream_render.py | script | 75.4 KB |
scripts/render_annotation_preview.py
View on GitHubimport json
import sys
from pathlib import Path
from PIL import Image, ImageDraw, ImageFont
def main(image_path: str, annotation_path: str, output_path: str) -> None:
image = Image.open(image_path).convert("RGBA")
overlay = Image.new("RGBA", image.size, (0, 0, 0, 0))
draw = ImageDraw.Draw(overlay)
font_file = "C:/Windows/Fonts/msyh.ttc"
font = ImageFont.truetype(font_file, 28)
small_font = ImageFont.truetype(font_file, 18)
colors = [(38, 103, 255, 225), (255, 105, 92, 225), (41, 167, 102, 225), (181, 100, 255, 225)]
data = json.loads(Path(annotation_path).read_text(encoding="utf-8"))
for index, element in enumerate(data["elements"], start=1):
region = element["region"]
x, y = region["x"], region["y"]
right, bottom = x + region["width"], y + region["height"]
color = colors[(index - 1) % len(colors)]
fill = (*color[:3], 24)
draw.rounded_rectangle((x, y, right, bottom), radius=12, outline=color, width=4, fill=fill)
draw.ellipse((x + 8, y + 8, x + 44, y + 44), fill=color)
draw.text((x + 19, y + 8), str(index), anchor="ma", font=small_font, fill="white")
label = f"{index}. {element['label']} {element['reveal']['direction']}"
draw.rounded_rectangle((x + 52, y + 8, min(right - 8, x + 52 + len(label) * 19), y + 46), radius=6, fill=(255, 255, 255, 225))
draw.text((x + 60, y + 12), label, font=small_font, fill=color)
start = tuple(element["handPath"]["start"])
end = tuple(element["handPath"]["end"])
draw.line((start, end), fill=color, width=4)
draw.polygon((end, (end[0] - 13, end[1] - 7), (end[0] - 13, end[1] + 7)), fill=color)
result = Image.alpha_composite(image, overlay).convert("RGB")
Path(output_path).parent.mkdir(parents=True, exist_ok=True)
result.save(output_path, quality=95)
if __name__ == "__main__":
main(*sys.argv[1:4])
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |