convez.ai
SkillAutomaçãoIntermediário
tristan-mcinnis

PPT Translator - Tradução com Formatação Intacta

tristan-mcinnis/PPT-Translator-Formatting-Intact-with-LLMs

Traduz PowerPoint preservando formatação com suporte multi-provider

Ver no GitHub
InicialPluginScore · de 0 a 100

Ferramenta Python que traduz apresentações PowerPoint mantendo toda a formatação original (fontes, cores, layouts, tabelas). Suporta múltiplos provedores de LLM (DeepSeek, OpenAI, Anthropic, Grok, Gemini) com processamento em lote e cache inteligente para otimizar custos.

Instalação

$npx convez-ai tristan-mcinnis/PPT-Translator-Formatting-Intact-with-LLMs

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
33
Forks
4
Acompanhando
2
Saúde
28%
Último commit
há 2 meses
Versão
—
Issues abertas
0
Contribuidores
2

Casos de uso

  • Traduzir decks corporativos para múltiplos idiomas sem perder design
  • Processar lotes de apresentações em diferentes idiomas automaticamente
  • Localizar conteúdo visual mantendo consistência de marca

Veredito

Solução prática e bem-implementada para automatizar tradução de PowerPoint. Destacam-se o suporte multi-provider, cache de strings e processamento em lote; ideal para equipes que precisam localizar apresentações em escala sem redesenho manual.

README

A tradução para o português deste README ainda está na fila.

PPT Translator

Convert your PowerPoint presentations to beautifully translated documents while preserving formatting

Python License UV Tests Code Style

Clean, fast, and reliable PowerPoint translation with multi-provider support and formatting preservation

✨ Features • 🚀 Quick Start • 📖 Usage • 🧪 Testing • 🤝 Contributing


✨ Features

• ⚡ Lightning Fast: Sub-2 second translation for most presentations • 🔄 Multi-Provider Support: Switch between DeepSeek, OpenAI, Anthropic, Grok, and Gemini with a simple CLI flag • 🎨 Rich Formatting: Preserves fonts, colors, spacing, tables, and alignment after translation • 🔗 Smart Caching: Avoids duplicate API calls for repeated strings • 📦 Batch Processing: Convert entire directories of presentations at once • 🛡️ Robust Processing: Handles all PowerPoint content types with graceful fallbacks

🆕 Recent Updates

  • Gemini support: Added Google Gemini as a translation provider
  • Updated model defaults: Now using latest model versions (GPT-5.2, Claude Sonnet 4.5, Grok 4.1)
  • Security fix: Replaced unsafe eval() with safe lookup functions

📦 Requirements

  • Python 3.10+
  • macOS (primary target), Linux, or Windows
  • Provider API keys stored in environment variables (see below)

Install dependencies:

python3 -m venv .venv
source .venv/bin/activate  # macOS/Linux
# .venv\Scripts\activate  # Windows PowerShell
pip install -r requirements.txt

🔐 Configuration

Copy example.env to .env and fill in the API keys for the providers you plan to use. All keys are optional – only populate the providers you intend to call.

cp example.env .env

Environment variables of interest:

ProviderRequired variableOptional variablesDefault model
DeepSeekDEEPSEEK_API_KEYDEEPSEEK_API_BASEdeepseek-chat
OpenAIOPENAI_API_KEYOPENAI_ORGgpt-5.2-2025-12-11
AnthropicANTHROPIC_API_KEY—claude-sonnet-4-5-20250514
GrokGROK_API_KEYGROK_API_BASEgrok-4.1-fast
GeminiGEMINI_API_KEY—gemini-3-flash-preview

📝 The CLI reads your .env file automatically when run from a shell session that has the variables exported. On macOS you can add the exports to ~/.zshrc or use direnv for project-specific secrets.

🚀 Usage

Run the CLI with the path to a single presentation or a directory tree:

python main.py /path/to/decks \
  --provider openai \
  --model gpt-5-mini \
  --source-lang zh \
  --target-lang en \
  --max-workers 4

Common options:

  • --provider {deepseek,openai,anthropic,grok,gemini} – choose the model provider.
  • --model MODEL_NAME – override the default model for that provider (e.g. gpt-5-nano).
  • --source-lang / --target-lang – ISO language codes.
  • --max-chunk-size – character limit per translation request (default: 1000).
  • --max-workers – number of threads used when scanning slides (default: 4).
  • --keep-intermediate – keep intermediate XML files for inspection/debugging.

The tool will generate:

  1. {deck}_original.xml – source deck contents.
  2. {deck}_translated.xml – translated content.
  3. {deck}_translated.pptx – rebuilt presentation with translated text and formatting intact.

🧪 Testing

Run unit tests with Pytest:

pytest

The test suite focuses on translation chunking/caching and CLI utilities to ensure the core pipeline stays reliable as providers evolve.

🛠️ Project Structure

.
├── .claude/skills/ppt-translator/  # Self-contained Agent Skill
│   ├── SKILL.md                    # Skill instructions for Claude
│   ├── LICENSE.txt
│   └── scripts/                    # Complete translation toolkit
├── ppt_translator/
│   ├── cli.py               # CLI parsing and orchestration
│   ├── pipeline.py          # PPT extraction, translation, regeneration
│   ├── providers/           # DeepSeek, OpenAI, Anthropic, Grok, Gemini adapters
│   ├── translation.py       # Chunking + caching translation service
│   └── utils.py             # Filesystem helpers
├── tests/                   # Pytest suite
├── example.env              # Environment variable template
├── requirements.txt
└── main.py                  # Entry point (delegates to CLI)

🤖 Agent Skill

This project includes a self-contained Agent Skill in .claude/skills/ppt-translator/.

The skill directory contains everything needed to use this translator in any agent workflow:

  • SKILL.md - Instructions for Claude on how to use the tool
  • scripts/ - Complete copy of all translation scripts and dependencies

To use in another project: Copy the .claude/skills/ppt-translator/ directory into your project's .claude/skills/ folder. The skill is fully self-contained with all necessary scripts included.

🤝 Contributing

Pull requests and issues are welcome. Please run pytest before submitting changes and document any new providers or configuration steps in the README.

📄 License

This project remains under the MIT License. See LICENSE for details.

Ver o original no GitHub

Bom para

Relacionados