papermorph
Make or edit animated, narrated, interactive web books from reference PDFs, animated picture books (paper-puppet films) from a story, a joke or a fairy tale, and narrated documentaries about a book or an idea, built from public-domain pictures. Use for book planning, storyboards, chapter animation and exercises, narration, and cover and contents pages, including "make the next chapter", "turn this story into a picture book", "make a documentary about this book" or "fix this animation". Deliver runnable static book files; bookshelf design, bookshelf registration and hosting are separate tasks.
中文简介正在准备中。当前显示原文说明。
实测评分 未实测
查看安装方法包含的文件(92)
- SKILL.md14.1 KB
- assets/scorm/launch.html759 B
- assets/scorm/scorm-bridge.js3.0 KB
- assets/scorm/scorm-host.js6.8 KB
- assets/scorm/test/check_scorm.py5.0 KB
- assets/scorm/test/mock-lms.html3.0 KB
- assets/scorm/test/serve.py990 B
- assets/templates/book.html3.4 KB
- assets/templates/chapter.html4.0 KB
- assets/templates/documentary/chapter.html2.4 KB
- assets/templates/documentary/lib/book.css846 B
- assets/templates/documentary/lib/film.js12.1 KB
- assets/templates/documentary/lib/fonts.css3.9 KB
- assets/templates/documentary/lib/fonts/EBGaramond-italic-400-latin-ext.woff248.7 KB
- assets/templates/documentary/lib/fonts/EBGaramond-italic-400-latin.woff225.7 KB
- assets/templates/documentary/lib/fonts/EBGaramond-normal-400-latin-ext.woff259.1 KB
- assets/templates/documentary/lib/fonts/EBGaramond-normal-400-latin.woff223.9 KB
- assets/templates/documentary/lib/fonts/EBGaramond-normal-500-latin-ext.woff266.0 KB
- assets/templates/documentary/lib/fonts/EBGaramond-normal-500-latin.woff225.3 KB
- assets/templates/documentary/lib/fonts/OFL-EBGaramond.txt4.3 KB
- assets/templates/documentary/lib/fonts/OFL-Oswald.txt4.4 KB
- assets/templates/documentary/lib/fonts/Oswald-normal-500-latin-ext.woff212.3 KB
- assets/templates/documentary/lib/fonts/Oswald-normal-500-latin.woff212.6 KB
- assets/templates/documentary/lib/fonts/Oswald-normal-600-latin-ext.woff212.4 KB
- assets/templates/documentary/lib/fonts/Oswald-normal-600-latin.woff212.6 KB
- assets/templates/documentary/narration.en.json151 B
- assets/templates/documentary/style.json1.4 KB
- assets/templates/e2e.py5.7 KB
- assets/templates/narration.en.json555 B
- assets/templates/picture-book/chapter.html2.4 KB
- assets/templates/picture-book/lib/cast.js19.5 KB
- assets/templates/picture-book/lib/paper.js17.3 KB
- assets/templates/picture-book/lib/shared.js1.6 KB
- assets/templates/picture-book/narration.en.json528 B
- assets/templates/picture-book/painted.json360 B
- assets/templates/picture-book/scene1.js2.1 KB
- assets/templates/picture-book/series.html3.9 KB
- assets/templates/picture-book/sets.js4.6 KB
- assets/templates/picture-book/style.json1.2 KB
- assets/templates/style.json1.8 KB
- assets/templates/unit-art.js1.7 KB
- references/assets.md2.5 KB
- references/authoring.md6.0 KB
- references/courses.md7.8 KB
- references/diagrams.md1.6 KB
- references/documentary.md10.7 KB
- references/engine.md24.9 KB
- references/intake.md9.4 KB
- references/painting.md5.2 KB
- references/puppets.md9.0 KB
- references/review.md6.5 KB
- references/scenes.md4.0 KB
- references/site.md11.1 KB
- references/sound.md6.0 KB
- references/stories.md9.1 KB
- references/team.md10.2 KB
- scripts/bake_puppets.py4.3 KB
- scripts/bake_sets.py4.1 KB
- scripts/browsers.py904 B
- scripts/check_blank.py4.2 KB
- scripts/commons.py8.8 KB
- scripts/eleven.py9.1 KB
- scripts/engine.py5.3 KB
- scripts/export.py11.7 KB
- scripts/frames.py3.3 KB
- scripts/items.py4.0 KB
- scripts/join.py8.0 KB
- scripts/ledger.py748 B
- scripts/level.py6.6 KB
- scripts/lint.py11.7 KB
- scripts/mouths.py3.2 KB
- scripts/outline.py6.7 KB
- scripts/overlap.py8.1 KB
- scripts/paint_openai.py5.3 KB
- scripts/paint.py3.8 KB
- scripts/painted.py7.9 KB
- scripts/perf.py2.6 KB
- scripts/playlog.py7.8 KB
- scripts/prep.py5.2 KB
- scripts/refs.py17.4 KB
- scripts/scorm.py10.3 KB
- scripts/serve.py2.6 KB
- scripts/sfx.py36.0 KB
- scripts/shot.py9.2 KB
- scripts/silence.py1.3 KB
- scripts/split_pages.py5.4 KB
- scripts/sprites.py3.6 KB
- scripts/still.py4.2 KB
- scripts/strip.py8.0 KB
- scripts/trace.py4.3 KB
- scripts/tts.py13.8 KB
- scripts/video.py4.0 KB
SKILL.md(原文)
安装前可以查看交给 AI 代理的指令内容。
Papermorph
Papermorph makes three kinds of book on one machine:
- Lessons, from a textbook PDF: each chapter is a short animated lesson film where the picture carries the explanation, the narration says it, and quick checks and practice happen inside the picture.
- Picture books, from a story, a joke or a fairy tale: short films of paper puppets in front of sets, drawn in code or painted by an image model, with voices, effects and music.
- Documentaries, from a book or an idea: narrated films of found public-domain pictures, words and maps moved in step with the voice, with music.
All are a 1600×900 SVG stage plus a player; beats pair narration clips with timed actions. Good means alive (things act and change with weight and timing), composed (each moment reads as one picture, text beside what it names), true (motion, labels and numbers agree at every moment) and smooth (it plays without stutter, Firefox included).
What the picture should be depends on the book and on the user, so the work starts with a conversation that ends in style.json: the user's words, the look they chose, the voices, which model does which step, and later the approved chapters. Every chapter is made against it; how each beat is laid out and choreographed is yours to judge against it and the approved chapters. User requests override defaults. Re-create explanations, examples and drawings; keep source PDFs, page images and extracted text outside the static output folder and out of version control (.gitignore: *.pdf, books/*/pages/). Deliver a self-contained book folder with local preview instructions.
Which path
| The user brings | Path | Read |
|---|---|---|
| A textbook PDF | Lessons | intake.md, then diagrams.md (tier 1) or scenes.md (tier 2), authoring.md, assets.md, review.md |
| A story, a joke, a fairy tale, or a story book's PDF | Picture books | stories.md, puppets.md, sound.md, painting.md for a painted look |
| A book, an idea or a stretch of history to explain as a narrated film | Documentaries | documentary.md, sound.md for music |
| A course book (cites works, reviewed questions, an LMS) | Lessons plus options | courses.md, only when the book calls for them |
Every path shares site.md (the book folder, cover or series page, preview, video export), engine.md (the player and drawing API), team.md (making chapters with subagents) and the models step of intake.md. Read only the reference the current step needs.
Project layout
books/<book>/
book.pdf, sections.json source and page map (private)
pages/chNN/text.md, *.png extracted reference material (private)
style.json the agreed style every chapter anchors to (assets/templates/style.json)
chapters.md chapter map and status
chapters/chNN.md storyboard, errata, feedback
images/ inbox, SOURCES.md (where each image came from), image-requests.md, processing scripts
review/chNN/ storyboard sheets, strips, check output
content/<book>/chNN/ narration.<lang>.json and TTS cache
tools/<book>/ tests and evidence scripts
site/<book>/ the static book (only this is delivered)
index.html, unit-art.js cover + contents, unit sketches
lib/engine.*, math.js, the engine (player, maths helpers, cover/contents, unit headers), copied into
volume.*, contents.*, the book by scripts/engine.py
units.*
lib/book.css this book's engine settings and style overrides
lib/*.js, img/ the book's element library and images
chNN/index.html, audio/<lang>/ a lesson, its beat MP3s + timings.js
A picture book adds books/<book>/story.md (the user's telling, verbatim), storyboard.md and art/ (sets.js with the set sketches, generated pictures, painted.json, costs.tsv); its site/<book>/lib/ holds the paper kit (paper.js, cast.js, shared.js from assets/templates/picture-book/, which needs engine-v2.2 or later: sfx() and music() are in the engine) and img/ the baked sets, props and puppet pieces; each episode chNN/ has one script per scene and audio/<lang>/, audio/sfx/, audio/bgm/.
A documentary adds books/<book>/storyboard.md, art/ (found/ with the downloaded pictures, the prep.py list, generated clips, costs.tsv) and music/, where commons.py keeps a SOURCES.tsv beside its downloads; its site/<book>/lib/ holds film.js, fonts.css and fonts/ from assets/templates/documentary/ (its book.css too, with the film's colours) and, when the film uses them, lines.js (trace.py); img/ holds the treated pictures with art.js (prep.py) and clip sheets with frames.js (frames.py); index.html is the series page with the credits; each film chNN/ has audio/<lang>/ and audio/bgm/.
SKILL means this skill's absolute folder; <book> is the book slug, <lang> its primary language code. Needs: uv, ffmpeg/ffprobe, Edge TTS network access (or Kokoro, local: uv run --python 3.12 --with kokoro), github.com for engine.py when the repository's engine/ folder is not at hand, an OpenRouter key only for the paid steps the user chooses (paint.py, eleven.py, video.py; paint_openai.py takes an OpenAI key), and Playwright browsers (uv run --with playwright playwright install chromium firefox; where Playwright's Chromium does not run, set CHROME to an installed Chrome, Chromium, Brave or Edge). Preview: python3 SKILL/scripts/serve.py 8765 site (no browser caching).
Lessons
Pipeline
Start with intake whenever books/<book>/style.json does not exist yet; reuse answers and approvals already given.
- Intake (intake.md), a short conversation: find the PDF with the user (a story goes to stories.md), split it, say what the book is, agree on one chapter to try and a tier, start the book folder, settle the look the way that tier needs, agree which model does which step, and write
style.json.- Split:
uv run --with pymupdf SKILL/scripts/outline.py books/<book>/book.pdf; use--level N -o books/<book>/sections.jsonat chapter depth. A chapter bookmark that points outside its neighbours is moved to the page holding its title or dropped, with a warning: look at those chapters' pages. For a PDF without usable chapter bookmarks, inspectsplit_pages.py … --pages 1-12 --out books/<book>/pages, then write the map from its contents (schema:outline.py --help). Extract chapter text withsplit_pages.py … --sections books/<book>/sections.json --out books/<book>/pages --text-only. - Start the book folder with site.md before showing the user any frames; build agreed shared components once into the book's library (assets.md) and list them in
style.json.
- Split:
- Pilot. Make the chosen chapter through the chapter loop and deliver it for the user's judgement. Fold their feedback into
style.jsonand record the chapter underapproved. - Remaining chapters and finish, when the user wants the whole book: write
chapters.md, produce chapters sequentially (see Context), complete cover text, contents and unit sketches using site.md. Deliver the static book folder, its entry URL for local preview and any unresolved issues.
A course book may also want verified citation links, a reviewed question bank or a SCORM package for an LMS; offer them only when the book calls for them (courses.md).
Chapter loop
- Read this chapter's
pages/chNN/text.md; render pages withsplit_pages.py … --only chNNwhen diagrams or missing text need images. Choose the ideas, examples and sections to teach. - Beats and narration: list beats in
chapters/chNN.mdwith what each says and which word triggers which action (authoring.md). Writecontent/<book>/chNN/narration.<lang>.json, thenuv run --with edge-tts SKILL/scripts/tts.py content/<book>/chNN/narration.<lang>.json site/<book>/chNN/audio/<lang>(for"engine": "kokoro":uv run --python 3.12 --with kokoro …). - Storyboard, layout first: in the real page, place everything for one to three key moments per beat, real elements at their real sizes, no motion yet. Capture them into one sheet with
strip.pyand give each frame one line: what it says and where the eye goes. That sheet is the storyboard. Note what the chapter needs beyond the library: draw it, or add it to the image requests. - Motion: add the motion, the camera and the questions; API and replay invariants are in engine.md.
- Delivery pass: watch your output in motion and judge it as a viewer would, against the storyboard; then run the checks in review.md. Correct what you find, recheck, deliver; report unresolved problems.
- Register: add the chapter to the contents (
unitsinContents.bookinindex.html), set the previous chapter'sCHAPTER.next, updatechapters.mdandchapters/chNN.md. Promote new shared decisions and recurring elements tostyle.jsonand the library. The coordinator owns this step when using subagents.
Picture books
Start with the story intake in stories.md whenever books/<book>/style.json does not exist yet; agree the models (intake.md) and write style.json. Then follow the order of work: the script and storyboard shown to the user before anything is built, the book folder (site.md), sound, sets, scenes, review rounds, and the user's viewing of the first cut. Each episode is a chapter (chNN); a series shares its cast, sets and series page.
Documentaries
Start with the intake in documentary.md whenever books/<book>/style.json does not exist yet. Then follow the order of work: research, the script and storyboard shown to the user, the folder from assets/templates/documentary/ (site.md), pictures found and treated, voice, music, the beats, review rounds and the user's viewing. Madness and Civilization on the shelf is the approved reference.
Scripts
All in SKILL/scripts/; each prints its usage with --help (run it with the uv run --with … its docstring names).
| For | Scripts |
|---|---|
| Every book | serve.py preview without caching · engine.py sync the engine into books · tts.py narration and word times · lint.py static checks · shot.py beat screenshots · strip.py storyboard sheets and motion strips · still.py stretches where nothing moves · perf.py Firefox frame times · export.py MP4 and .srt |
| Lessons | outline.py and split_pages.py page map and chapter text · check_blank.py empty openings · overlap.py arrows through text · sprites.py image processing steps |
| Picture books | mouths.py mouth shapes · level.py even loudness · join.py one clip per scene · sfx.py synthesized effects · playlog.py sounds and captions against the picture · bake_sets.py set layers · bake_puppets.py puppet bitmaps · paint.py / paint_openai.py image-model pictures · painted.py place them in the book |
| Documentaries | commons.py public-domain pictures and recordings with their licences · prep.py print and line treatments · trace.py drawings that draw themselves on · video.py a clip from a still · frames.py a clip as treated frames · eleven.py ElevenLabs narration with word times |
| Course options | refs.py verified citations · items.py question bank · scorm.py LMS package |
silence.py, ledger.py and browsers.py are helpers the others import.
Context
- Talk with the user from the main conversation: intake, and every sheet and choice of the pilot. When subagents are available, chapters are made as a team: a fresh worker per step of the chapter loop, each on the model the user chose for that step (
modelsinstyle.json), chapters one after another; a picture book splits by scene instead, a documentary by part of the film. The main conversation coordinates the pilot, since the user sees its sheets; later chapters are best coordinated from a fresh session (team.md). Without subagents, run the same loop in the current agent with file-based state. - A worker needs little besides this Skill and
style.json: the user's words, the look, the approved chapters to watch and read, the element library. A brief adds the chapter, its pages, the step's inputs and outputs and any current user request. Workers reply in a few lines; the coordinator registers the chapter. - Use the engine API and inspect individual functions when needed; copy assets rather than reading their full source as instructions.
- Keep
style.jsoncurrent and short. Chapter status, errata and historical feedback stay inchapters.mdandchapters/chNN.md.
评价
还没有评价。欢迎分享你的使用感受。
评论
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。