$ show ningzimu/image-to-editable-ppt-skill
This repository implements an AI-agent skill that converts images, PDFs, and image-based PPT/PPTX files into fully editable PowerPoint (.pptx) documents. The system uses a deterministic CLI state machine (`editppt`) with a four-phase workflow: normalize input into per-page jobs, dispatch to subagents for page reconstruction, record page manifests, and finalize by rebuilding the PPTX from manifests. It integrates OCR (PaddleOCR or offline detector) for text bounding boxes, image generation/editing backends (built-in, OpenAI-compatible, or Codex OAuth), and LaTeX rendering for formulas. The output preserves native text boxes, shapes (including custom paths and polygons), tables, images, and speaker notes, with strict provenance tracking for all assets. The codebase is well-structured with clear separation of concerns, a manifest-driven assembly pattern, and comprehensive tests. However, the last commit date is anomalously in the future (2026-09-16), suggesting the repository may be abandoned or the timestamp is erroneous; combined with only 1 open issue and no recent activity, it is classified as stale. The technical drift is low as the code uses modern Python and standard libraries, but external dependencies (OCR, image APIs, LaTeX) may become incompatible over time.
The LLM identified 4 files worth highlighting for reuse:
A self-contained module that builds a complete .pptx file from a JSON manifest. It generates native PowerPoint elements including text boxes with fitted font sizes, shapes (custom paths, polygons, roundRect), images, native tables with merged cells, and speaker notes. The module handles coordinate normalization from pixel to inches, font fitting with safety margins, and preview rendering via Pillow/ImageMagick. It is reusable for any PPT generation task that can produce a compatible manifest, and demonstrates non-obvious skill in generating complex DrawingML XML.
Provides utilities for generating DrawingML geometry XML for custom paths, polygons, and preset shapes. It converts pixel-coordinate paths and polygons into the XML format required by PowerPoint, handling closed/open paths, stroke/fill, and corner radii. This module is tightly focused on geometry conversion and can be extracted for any application that needs to programmatically create PowerPoint shapes with custom outlines.
Renders LaTeX formulas to SVG, PNG, or PDF using local TeX engines (xelatex, lualatex, pdflatex) and converters (dvisvgm, pdf2svg, ImageMagick). It produces manifest fragments that can be merged into the page manifest. The module is self-contained, parameterized by TeX tool paths, and can be reused in any document generation pipeline that requires high-quality formula rendering.
Generates native PowerPoint table XML from a normalized table definition. Supports merged cells, column/row spans, text alignment, and table styles. The module is a focused component of the PPTX builder but can be reused independently for any application that needs to create complex tables in PowerPoint via python-pptx XML manipulation.