diff options
| author | kj_sh604 | 2026-02-28 14:54:01 -0500 |
|---|---|---|
| committer | kj_sh604 | 2026-02-28 14:54:01 -0500 |
| commit | 3dfbb69f676242cda3b9a34866853f5283c934c6 (patch) | |
| tree | 5247b4906e1a63bc3b681db5f69b9aea0e9ad9a6 | |
| parent | 1b60f0eaf0a04d1c67ec987fc9222543bb7e2e45 (diff) | |
refactor: README.md
| -rw-r--r-- | README.md | 23 |
1 files changed, 12 insertions, 11 deletions
| @@ -10,31 +10,32 @@ https://github.com/user-attachments/assets/c7fe58c1-ff76-41bf-977b-870247a6a3e2 | |||
| 10 | 10 | ||
| 11 | ## what it does | 11 | ## what it does |
| 12 | - merges multiple .pptx files into one | 12 | - merges multiple .pptx files into one |
| 13 | - preserves visual formatting by rendering slides and rebuilding a new deck | 13 | - preserves full editability, with 99% fidelity to the original formatting (some minor quirks may occur) |
| 14 | - copies slide masters, layouts, themes, notes, and embedded media | ||
| 14 | - `pandoc`-style usage: `kjandoc input1.pptx input2.pptx -o combined.pptx` | 15 | - `pandoc`-style usage: `kjandoc input1.pptx input2.pptx -o combined.pptx` |
| 15 | 16 | ||
| 16 | ## why this exists | 17 | ## why this exists |
| 17 | `pandoc` is great, but it can't concatenate `.pptx` files. | 18 | `pandoc` is great, but it can't concatenate `.pptx` files. |
| 18 | 19 | ||
| 19 | this uses a headless libreoffice + pdf -> png rendering to get a merge with most formatting preserved. | 20 | this works directly at the OOXML/ZIP level: it reads each `.pptx` as a ZIP archive, rewires all internal XML relationships, and writes a new near full Microsoft-compliant `.pptx`. |
| 20 | 21 | ||
| 21 | the tradeoff is the output slides are images (not editable shapes). | 22 | a final LibreOffice normalization pass cleans up any lingering structural quirks to prevent PowerPoint repair prompts (not guaranteed though). |
| 22 | 23 | ||
| 23 | ## usage | 24 | ## usage |
| 24 | ```bash | 25 | ```bash |
| 25 | # pandoc-style usage | 26 | # pandoc-style usage |
| 26 | ./kjandoc input1.pptx input2.pptx -o combined.pptx | 27 | ./kjandoc input1.pptx input2.pptx -o combined.pptx |
| 27 | 28 | ||
| 28 | # tweak quality | 29 | # merge more than two |
| 29 | ./kjandoc input1.pptx input2.pptx -o combined.pptx --dpi 150 | 30 | ./kjandoc a.pptx b.pptx c.pptx -o combined.pptx |
| 30 | ``` | 31 | ``` |
| 31 | 32 | ||
| 32 | ## deps | 33 | ## deps |
| 33 | - python3 | 34 | - python3 |
| 34 | - libreoffice | 35 | - libreoffice (for the normalization pass) |
| 35 | - poppler (pdftoppm) | 36 | - python deps in requirements.txt (`lxml`) |
| 36 | - python deps in requirements.txt | ||
| 37 | 37 | ||
| 38 | ## notes | 38 | ## notes |
| 39 | - output size is larger (images) | 39 | - output slides are fully editable |
| 40 | - visuals stay intact for the most part | 40 | - masters and layouts from all source files are carried over |
| 41 | - duplicate media files are deduplicated automatically | ||
