Deck to PPTX
ak3ne/deck-to-pptx
HTML slide deck → PowerPoint editável com objetos nativos e fontes embedded
Ver no GitHubConverte apresentações HTML auto-construídas em PowerPoint nativo e totalmente editável, preservando texto, mídia e fontes como objetos reais. Usa renderização headless para extrair geometria exata dos elementos e injeta fontes embedded via OOXML, garantindo fidelidade visual em qualquer máquina.
Instalação
npx convez-ai ak3ne/deck-to-pptx1 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
Casos de uso
- Migrar decks HTML customizados para formato editável (powerpoint)
- Preservar layout e tipografia exata ao converter para .pptx
- Automatizar geração de presentations a partir de templates web
Veredito

Skill robusto e bem-arquitetado para um caso niche real: quem constrói decks em HTML e precisa entregar em PowerPoint editável. Exige setup manual de knobs por deck, mas Claude Code reduz friction. Produção-ready para quem domina Python e headless rendering.
README
A tradução para o português deste README ainda está na fila.
deck-to-pptx
Convert a self-built HTML slide deck into a near-perfect editable PowerPoint — where every text block, photo, and video is a real native PPT object you can click and edit, and only the un-reproducible decoration (gradients, card fills, rules, SVG charts, diagrams) is baked as a flat per-slide background image. All fonts are embedded, so it renders identically on a machine that has none of them installed.
It's a Claude Code skill plus four standalone Python scripts you can also run by hand.
How it works
The core idea is to not rebuild your layout by hand. Instead:
scripts/build_fonts.py— downloads the font families your deck uses (Google Fonts, OFL = embedding-license-clean), flattens variable fonts to static weights, and subsets CJK faces to GB2312 so the file stays small while staying fully typeable.scripts/extract.py— renders each slide at 1920×1080 in headless Chromium (Playwright), reads every element's computed geometry + style intodeck.json, and bakes a text/media-hidden "decoration plate" PNG per slide.scripts/generate.py— uses python-pptx to place the plate full-bleed, then native text boxes / cropped photos / embedded video at the exact browser-computed coordinates (1px = 0.5pt, 13.333"×7.5", 16:9).scripts/embed_fonts.py— injects the fonts straight into the.pptxvia OOXML (embeddedFontLst+saveSubsetFonts="0"= embed all characters, so the deck stays editable), with no PowerPoint required.
It is inspect-then-adapt, not a magic one-click converter: every deck differs (fonts, slide
selector, on-screen chrome), so you tune a handful of clearly-marked # === ADAPT PER DECK ===
knobs before running. With Claude Code, the skill does this inspection and adaptation for you.
Requirements
pip install fonttools playwright python-pptx Pillow lxml
playwright install chromium
Use it as a Claude Code skill
Drop this repo into your skills folder so Claude can drive the whole flow:
git clone https://github.com/ak3ne/deck-to-pptx ~/.claude/skills/deck-to-pptx
Then just ask: "convert this deck to pptx ~/path/to/deck.html". Claude reads the HTML, copies
the scripts into a build folder, adapts the per-deck knobs, runs the four stages, verifies the
font embedding, and hands back <name> (editable).pptx.
Optional slash command
For a one-keystroke trigger, add ~/.claude/commands/deck-to-pptx.md:
---
description: Convert a self-built HTML slide deck into an editable PowerPoint. Pass the path to the .html.
---
Follow the `deck-to-pptx` skill to convert the HTML deck at $ARGUMENTS into an editable .pptx:
inspect the HTML, copy scripts/* into a `pptx-build/` folder beside it, adapt the per-deck knobs,
run the 4 stages, verify font embedding, then deliver the pptx and remind about the PDF fallback.
Now /deck-to-pptx ~/path/to/deck.html runs the whole thing.
Use it by hand
mkdir pptx-build && cp scripts/*.py pptx-build/ && cd pptx-build
# edit the `# === ADAPT PER DECK ===` sections for your deck's fonts/selectors/chrome
export DECK_HTML="/abs/path/deck.html" DECK_NAME="mydeck" DECK_OUT="/abs/out/dir"
python3 build_fonts.py && python3 extract.py && python3 generate.py && python3 embed_fonts.py
The final file lands at $DECK_OUT/mydeck (editable).pptx.
Per-deck knobs
| Script | Adapt |
|---|---|
build_fonts.py | JOBS — the families your deck uses (Google Fonts URLs, weights, which are CJK) |
embed_fonts.py | FAMILIES — must mirror the fonts/final/*.ttf produced above |
extract.py | FAMILY() font-stack map, BG_CSS chrome selectors, FORCE_COUNTERS attrs, slide selector |
generate.py | GOLD/INK fallback colors for gradient-clipped text |
Gotchas worth knowing
- Apple system Chinese fonts (PingFang/Hiragino) can't be embedded — remap deck body Chinese to
an embeddable face like Noto Sans SC (the
FAMILY()mapper inextract.pydoes this). - PPTX font embedding is only honored by PowerPoint (Windows + current Mac) — not Keynote, Google Slides, or the web viewer. Ship a PDF alongside as the cross-app fallback.
- PowerPoint warning "Some fonts cannot be saved… Font Not Available" on save means the fonts
are embedded in the file but not installed on that machine; if you hit Save, PowerPoint
strips them. Either install
fonts/final/*.ttffirst, or click Don't Save — the file the pipeline produced is already correct. - Gradient-clipped text (e.g. gradient counters) can't be a real gradient in PPT and renders as a solid fallback color — visually equivalent at a glance.
Verify the embedding
unzip -l "mydeck (editable).pptx" | grep fonts/ # should list ppt/fonts/*.fntdata
Any font used in the slides but missing from <p:embeddedFontLst> (besides system Arial/Calibri)
will substitute on someone else's machine.
License
MIT © Arthur Akane. Fonts are downloaded at build time from Google Fonts under the SIL Open Font License; this repo bundles no font files.