PPT Translator
v1.0.0Translate PowerPoint files to any language while preserving layout. Uses a render-and-verify agent loop (LibreOffice + Vision) to guarantee no text overflow....
Security Scan
OpenClaw
Benign
high confidencePurpose & Capability
Name/description (translate PPTX while preserving layout) match the included script and SKILL.md. The script extracts text, rewrites slides with scaled fonts, and can invoke LibreOffice to render PNGs — all coherent with the stated purpose. Required binaries listed in _meta.json (libreoffice, python-pptx) are appropriate.
Instruction Scope
SKILL.md instructs an agent loop that uses an LLM for translation and a Vision model for overflow detection. The shipped script only performs extraction, rewriting, and local LibreOffice rendering; it does not itself call external APIs. However, the agent-level instructions implicitly require sending slide content to an LLM and to a Vision model for verification — this is expected for the feature but is a privacy/data-flow consideration because endpoints/credentials are not specified.
Install Mechanism
No install spec is provided (instruction-only with a small helper script). That is low-risk: nothing is automatically downloaded or written to disk by an installer. Runtime requires system LibreOffice and Python dependency python-pptx, which is reasonable and declared.
Credentials
The skill declares no required environment variables or credentials (correct). However, SKILL.md assumes use of an LLM and a Vision model; depending on your agent configuration these calls may transmit slide content to external services and may require API keys not declared here. This is a privacy/operational consideration, not a hidden credential request by the skill itself.
Persistence & Privilege
Skill is not marked always:true and is user-invocable. It does not request persistent system-wide changes or other skills' configs. It will read and write files provided by the user (input/output paths) which is expected for its purpose.
Assessment
This skill appears to be what it claims: a local utility + agent loop that rewrites PPTX and uses LibreOffice to render for overflow checks. Before installing/use: (1) Ensure LibreOffice and python-pptx are available locally; the script calls the libreoffice binary (subprocess) and will write output files in the specified directory. (2) Provide an explicit --output path when invoking the script (args.output is optional in code but passing None may cause errors). (3) Understand privacy implications: SKILL.md expects an LLM to translate and a Vision model to check renders — if your agent forwards slide content to external model APIs, that will send potentially sensitive data off your system and may require API keys not included here. (4) The script itself does not contact network endpoints or require secrets, but the overall workflow depends on your agent's LLM/Vision configuration; only install/run if you trust how those components will be invoked and where data will go. (5) As always, review or run the script in a safe environment on non-sensitive files first.Like a lobster shell, security has layers — review code before you run it.
latest
🎯 PPT Translator
保持排版翻译 PPT,支持任意语言对。
核心原理
Agent Loop(渲染验证):
- 提取 PPT 文字 + 样式
- LLM 翻译(保证准确)
- 写回 PPT(python-pptx)
- LibreOffice 渲染成真实 PNG
- Vision 模型检测文字溢出
- 有溢出 → 缩字号 15% → 回步骤 3
- 通过 → 输出最终 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
Agent 调用流程
- 用户发送 PPTX 文件
- Agent 提取所有文字 → 翻译(自己翻译或调用 LLM)
- 调用
scripts/translate.py执行渲染验证循环 - 循环完成后将输出 PPTX 发回用户
输出
- 最终 PPTX 文件(可编辑)
- 渲染验证 PNG(可选,用于确认)
- 迭代日志(几轮收敛、最终字号缩放比)
注意事项
- LibreOffice 首次启动较慢(~5s),之后正常
- 字号缩放是全局的(所有 shape 等比缩),未来可优化为 per-shape
- 不支持 .ppt(老格式),仅支持 .pptx
Comments
Loading comments...
