name: ppt-translator description: Translate PowerPoint files to any language while preserving layout. Uses a render-and-verify agent loop (LibreOffice + Vision) to guarantee no text overflow. Activate when user wants to translate a PPT/PPTX file.
保持排版翻译 PPT,支持任意语言对。
Agent Loop(渲染验证): 1. 提取 PPT 文字 + 样式 2. LLM 翻译(保证准确) 3. 写回 PPT(python-pptx) 4. LibreOffice 渲染成真实 PNG 5. Vision 模型检测文字溢出 6. 有溢出 → 缩字号 15% → 回步骤 3 7. 通过 → 输出最终 PPTX
python-pptx(pip)libreoffice(yum/apt)python3 scripts/translate.py \
--input /path/to/file.pptx \
--output /path/to/output.pptx \
--translations '{"原文": "translation", ...}' \
--max-iter 5
7w4.net提供免费和付费技能下载。
scripts/translate.py 执行渲染验证循环这个 PPT 翻译工具质量不错,核心设计实用,文档清晰易懂,能有效处理翻译后的排版问题。不过功能范围较窄,只支持较新的 pptx 格式,不支持老版本;某些复杂排版情况下可能出现文字溢出。使用前需要了解它的能力和限制。整体来说是个靠谱的翻译工具,但可能不适合所有 PPT 文件。