一份 .loomd → HTML 幻灯 / PPTX / PDF / MP4。 冻结说明:release-v0.1 · 验收:acceptance-v0.1
要求
| 用途 | 依赖 |
|---|---|
| 始终 | Ruby 3.3+、Bundler |
typst(scoop install typst) | |
| Video | Chrome 或 Edge、ffmpeg |
| 有声旁白 | pip install edge-tts(或 python -m edge_tts) |
| Mermaid 真图 | 可选 mmdc |
安装
cd ruby
bundle install
四件套(克隆后跑通)
bundle exec trunkim build ../examples/l1-product-review.loomd --out ../dist/l1 --emit html,pptx
bundle exec trunkim build ../examples/l2-handout.loomd --target pdf --out ../dist/l2
bundle exec trunkim build ../examples/l3-launch-spot.loomd --target video --out ../dist/l3
| 产出 | 路径 |
|---|---|
| HTML | dist/l1/index.html |
| PPTX | dist/l1/l1-product-review.pptx |
dist/l2/l2-handout.pdf | |
| MP4 + VTT | dist/l3/l3-launch-spot.mp4 |
或一次 smoke:
bundle exec rake smoke
命令
bundle exec trunkim validate ../examples/l1-product-review.loomd
bundle exec trunkim ir ../examples/l3-launch-spot.loomd --target video
bundle exec trunkim build <file.loomd> --out DIR [--target slides|pdf|video] [--emit html,pptx,pdf,mp4]
测试 / CI
bundle exec rake test
bundle exec rake smoke # 本地全量
bundle exec rake smoke:slides # 仅 HTML+PPTX
CI:GitHub Actions 跑 rake test + rake smoke(workflow 在仓库 .github/workflows/,不随静态站发布)。
Source of truth: ruby/README.md. Edit there, then run python scripts/gen_site_docs.py.