脚本命令
视觉验证
bash
python3 scripts/verify.py design.html \
--viewports 1920x1080,390x844 \
--output ./screenshotsHTML 动画转视频
bash
NODE_PATH=$(npm root -g) node scripts/render-video.js design.html \
--duration=30 --width=1920 --height=1080确定性逐帧渲染:
bash
NODE_PATH=$(npm root -g) node scripts/render-video-seek.js design.html \
--duration=30 --fps=60 --width=1920 --height=1080格式转换与音乐
bash
bash scripts/convert-formats.sh design.mp4 1280
bash scripts/add-music.sh design.mp4 --mood=tech --out=design-bgm.mp4幻灯片导出
bash
node scripts/export_deck_pdf.mjs --slides ./slides --out ./deck.pdf
node scripts/export_deck_pptx.mjs --slides ./slides --out ./deck.pptx
node scripts/export_deck_stage_pdf.mjs --html ./deck.html --out ./deck.pdf生成缩略图
bash
node scripts/gen_deck_thumbs.mjs \
--slides ./slides \
--out ./thumbs \
--width 1600 \
--quality 86获取图片
bash
python3 scripts/fetch_images.py \
--query "Petronas Towers" "Langkawi beach" \
--out ./assets/img \
--count 2 \
--width 1600旁白与混音
bash
node scripts/narrate-pipeline.mjs --script ./script.md --out-dir ./_narration
bash scripts/render-narration.sh ./video.html \
--timeline=./_narration/timeline.json --seek --out=./final.mp4
bash scripts/mix-voiceover.sh ./video.mp4 \
--voiceover=./voice.mp3 --bgm-mood=educational --out=./final.mp4注意
脚本参数可能随仓库更新。执行前可运行脚本的帮助或阅读文件头部 Usage。涉及覆盖输出文件和外部 API 时先检查路径与凭证。