Ppt translator
Skill tristan-mcinnis/PPT-Translator-Formatting-Intact-with-LLMs/.claude/skills/ppt-translator
A powerful PowerPoint translation tool that preserves all formatting while translating content using the Deepseek API. This tool maintains fonts, colors, layouts, and other styling elements while providing accurate translations between languages.
npx -y skills add tristan-mcinnis/PPT-Translator-Formatting-Intact-with-LLMs --skill ppt-translatorAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
What its author says it does
Copied from the file, not written here
Translate PowerPoint presentations while preserving formatting (fonts, colors, alignment, tables). Supports multiple LLM providers (OpenAI, Anthropic, DeepSeek, Grok, Gemini). Use when translating .pptx files between languages, especially for CJK to/from English translations where text expansion/contraction is a concern.
The file declares its own license as MIT - see LICENSE.txt. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
5.2 KB, as published. Nobody here has run it
PowerPoint Translation Skill
Translate PowerPoint presentations while preserving all formatting including fonts, colors, spacing, tables, and alignment.
When to Use This Skill
- Translating
.pptxfiles between languages - Batch translating multiple presentations in a directory
- Preserving slide formatting during translation (especially CJK ↔ English)
- When you need to inspect intermediate XML for debugging
Setup
Before first use, set up the environment:
# Navigate to the scripts directory
cd .claude/skills/ppt-translator/scripts
# Create virtual environment and install dependencies
python3 -m venv .venv
source .venv/bin/activate # macOS/Linux
pip install -r requirements.txt
# Configure API keys
cp example.env .env
# Edit .env with your provider API key(s)
Basic Usage
cd .claude/skills/ppt-translator/scripts
source .venv/bin/activate
python main.py /path/to/presentation.pptx \
--provider openai \
--source-lang zh \
--target-lang en
Provider Configuration
| Provider | Environment Variable | Default Model |
|---|---|---|
| openai | OPENAI_API_KEY | gpt-5.2-2025-12-11 |
| anthropic | ANTHROPIC_API_KEY | claude-sonnet-4-5-20250514 |
| deepseek | DEEPSEEK_API_KEY | deepseek-chat |
| grok | GROK_API_KEY | grok-4.1-fast |
| gemini | GEMINI_API_KEY | gemini-3-flash-preview |
CLI Reference
| Option | Description | Default |
|---|---|---|
--provider | LLM provider: openai, anthropic, deepseek, grok, gemini | openai |
--model | Override default model for provider | Provider default |
--source-lang | Source language ISO code | zh |
--target-lang | Target language ISO code | en |
--max-chunk-size | Characters per API request | 1000 |
--max-workers | Threads for slide extraction | 4 |
--keep-intermediate | Retain XML files for debugging | false |
Output Files
For each input presentation.pptx, the tool generates:
presentation_original.xml- Extracted source content (deleted unless--keep-intermediate)presentation_translated.xml- Translated content (deleted unless--keep-intermediate)presentation_translated.pptx- Final translated presentation with formatting intact
Common Workflows
Translate a Single File (Chinese → English)
python main.py deck.pptx --provider anthropic --source-lang zh --target-lang en
Batch Translate a Directory
python main.py /path/to/presentations/ --provider openai --source-lang ja --target-lang en
Debug Translation Issues
python main.py deck.pptx --keep-intermediate --provider deepseek
# Inspect the generated XML files to see extracted/translated content
Use a Specific Model
python main.py deck.pptx --provider openai --model gpt-5-mini
Translate with Gemini (Cost-Effective)
python main.py deck.pptx --provider gemini --source-lang ko --target-lang en
Supported Languages
Use standard ISO 639-1 language codes:
| Code | Language |
|---|---|
zh | Chinese (Simplified) |
en | English |
ja | Japanese |
ko | Korean |
es | Spanish |
fr | French |
de | German |
pt | Portuguese |
ru | Russian |
ar | Arabic |
Design Notes
Font Scaling
The tool automatically scales fonts down (70% for text, 80% for tables) to accommodate text expansion when translating from compact languages (Chinese, Japanese, Korean) to English. This prevents text overflow in fixed-size text boxes.
Caching
Repeated strings within a presentation are cached to avoid redundant API calls. This is especially useful for presentations with recurring headers, footers, or terminology.
Chunking
Long text blocks are intelligently split at sentence boundaries to stay within API limits while preserving translation quality.
Troubleshooting
"API key not found"
Ensure your .env file in the scripts directory contains the correct environment variable:
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
Formatting looks wrong
- Use
--keep-intermediateto inspect the XML files - Check if the source presentation has unusual formatting
- Try a different provider
Translation incomplete
- Check for API rate limits with your provider
- Try reducing
--max-chunk-sizefor very long text blocks - Ensure your API key has sufficient quota
Script Reference
The scripts/ directory contains:
main.py- Entry pointrequirements.txt- Python dependenciesexample.env- Environment variable templateppt_translator/- Core translation modulecli.py- CLI argument parsingpipeline.py- PPT extraction and regenerationtranslation.py- Chunking and cachingproviders/- LLM provider implementations
Gives 0 of the 12 instructions most pdf office docs skills give
Counted across 635 of the 690 authors here whose files we hold, read 2026-08-06
- extract text using pdfplumberin 92 of 635, across 25 files
- create PDFs using reportlabin 83 of 635, across 16 files
- read FORMS.md to fill out PDF formsin 80 of 635, across 13 files
- OCR scanned PDFs using pytesseractin 77 of 635, across 10 files
- merge or split PDFs using qpdfin 70 of 635, across 3 files
- use Excel formulas instead of hardcoded calculated valuesin 68 of 635, across 12 files
- unpack edit xml and repack existing documentsin 63 of 635, across 8 files
- document sources for hardcoded valuesin 61 of 635, across 9 files
- write minimal python code without unnecessary commentsin 59 of 635, across 7 files
- run the recalculation script after adding or modifying formulasin 58 of 635, across 6 files
- fix all identified formula errors and recalculatein 58 of 635, across 6 files
- format years as text stringsin 57 of 635, across 5 files
Said here and by no other author read
- configure provider api keys in env file
- execute main.py to translate presentations
- specify provider source and target languages
- batch translate a directory of presentations
- use keep-intermediate to debug translation issues
- inspect generated xml files for debugging
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once.