← ClaudeAtlas

deck-to-pptxlisted

Convert a self-built HTML slide deck into a near-perfect EDITABLE PowerPoint (.pptx) where every text block, photo, and video is a native PPT object and only un-reproducible decoration (gradients, cards, SVG, diagrams) is baked as a per-slide background image, with all fonts embedded. Use when the user has an HTML presentation/slide deck and wants a PowerPoint version, says "convert this deck to pptx", "html to powerpoint", "editable pptx from my html", or shares a path to an HTML deck and asks for a .pptx.
ak3ne/deck-to-pptx · ★ 0 · Data & Documents · score 72
Install: claude install-skill ak3ne/deck-to-pptx
# deck-to-pptx — HTML deck → editable PPTX Rebuild an HTML slide deck as a native, editable PowerPoint. The trick: don't recreate the layout by hand — render the HTML in a real browser, read each element's *computed* geometry, and rebuild those as native PPT objects, baking only the un-reproducible decoration (gradients, card fills, rules, SVG charts) as one flat background image per slide. This is **inspect-then-adapt**, not zero-touch: every deck differs (fonts, slide selector, chrome), so read the HTML and tune the marked knobs before running. ## Pipeline (4 stages, run from the build folder) 1. **`build_fonts.py`** — download the families the deck uses (Google Fonts, OFL = embed-clean), flatten variable→static weights, subset CJK to GB2312 + the deck's charset (small but typeable). 2. **`extract.py`** — Playwright renders each slide at 1920×1080, reads geometry+style → `deck.json`, and bakes a text/media-hidden "decoration plate" PNG per slide. 3. **`generate.py`** — python-pptx lays the plate full-bleed + native text/photo/video objects at `1px = 0.5pt` (13.333"×7.5", 16:9). 4. **`embed_fonts.py`** — OOXML-inject the fonts (`embeddedFontLst` + `saveSubsetFonts="0"` = full characters → client can edit, not just view). No PowerPoint needed. ## Workflow 1. **Inspect the HTML**: slide selector (default `section.slide`), every font used (flag CJK + Apple system Chinese → remap to Noto Sans SC), chrome to hide (nav/progress/key-hints), and any count-up