pptd-utils 2026.10.2.dev3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pptd_utils/README.md +95 -0
- pptd_utils/__init__.py +10 -0
- pptd_utils/__main__.py +5 -0
- pptd_utils/_shape_data.py +134 -0
- pptd_utils/anim.py +367 -0
- pptd_utils/charts_native.py +847 -0
- pptd_utils/charts_raster.py +1019 -0
- pptd_utils/fonts.py +130 -0
- pptd_utils/icons.py +135 -0
- pptd_utils/images.py +105 -0
- pptd_utils/lines.py +180 -0
- pptd_utils/main.py +285 -0
- pptd_utils/render_text.py +241 -0
- pptd_utils/rich.py +213 -0
- pptd_utils/shapes.py +334 -0
- pptd_utils/slides_image.py +128 -0
- pptd_utils/style.py +253 -0
- pptd_utils/tables.py +241 -0
- pptd_utils/xmlutil.py +109 -0
- pptd_utils-2026.10.2.dev3.dist-info/METADATA +120 -0
- pptd_utils-2026.10.2.dev3.dist-info/RECORD +23 -0
- pptd_utils-2026.10.2.dev3.dist-info/WHEEL +4 -0
- pptd_utils-2026.10.2.dev3.dist-info/entry_points.txt +3 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: pptd-utils
|
|
3
|
+
Version: 2026.10.2.dev3
|
|
4
|
+
Summary: Offline PPTD v2 toolkit for converting editable presentations to PowerPoint
|
|
5
|
+
Author: binaryify
|
|
6
|
+
License: MIT
|
|
7
|
+
Keywords: powerpoint,pptd,pptx,presentation
|
|
8
|
+
Classifier: Development Status :: 3 - Alpha
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
13
|
+
Requires-Python: >=3.9
|
|
14
|
+
Requires-Dist: lxml>=4.9
|
|
15
|
+
Requires-Dist: pillow>=9
|
|
16
|
+
Requires-Dist: python-pptx>=0.6.21
|
|
17
|
+
Requires-Dist: pyyaml>=6
|
|
18
|
+
Provides-Extra: fonts
|
|
19
|
+
Requires-Dist: brotli>=1; extra == 'fonts'
|
|
20
|
+
Requires-Dist: fonttools>=4; extra == 'fonts'
|
|
21
|
+
Provides-Extra: math
|
|
22
|
+
Requires-Dist: latex2mathml>=3; extra == 'math'
|
|
23
|
+
Requires-Dist: mathml2omml>=0.0.2; extra == 'math'
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
|
|
26
|
+
# pptd_utils
|
|
27
|
+
|
|
28
|
+
Offline PPTD toolkit — full-spec `.pptd` → `.pptx` converter + slide image export (collage / single slide). Pure Python, no browser required.
|
|
29
|
+
|
|
30
|
+
Built against the PPTD v2 spec (`skills/cowork-ppt/reference/pptd.md`, relative to the repo root).
|
|
31
|
+
|
|
32
|
+
## Install / dependencies
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
pip install python-pptx Pillow PyYAML
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Optional (graceful fallback if missing):
|
|
39
|
+
|
|
40
|
+
| Package | Unlocks | Fallback |
|
|
41
|
+
|---|---|---|
|
|
42
|
+
| `latex2mathml` + `mathml2omml` | native equations (OMML) from `\( ... \)` | literal text |
|
|
43
|
+
| `fontTools` | customFonts (Google Fonts woff2 → embedded TTF) | fonts skipped |
|
|
44
|
+
|
|
45
|
+
Slide images additionally need **LibreOffice** (`soffice` on PATH).
|
|
46
|
+
|
|
47
|
+
## CLI
|
|
48
|
+
|
|
49
|
+
Install from PyPI:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
python -m pip install pptd-utils
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Commands write beside the input path. `all` is the default; selections accept comma-separated 1-based slide numbers.
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
pptd check deck.pptd
|
|
59
|
+
pptd pptx deck.pptd
|
|
60
|
+
pptd png deck.pptd # all slides -> deck-png/
|
|
61
|
+
pptd png 1,2,3 deck.pptd # selected slides -> deck-png/
|
|
62
|
+
pptd png collage deck.pptd # contact sheet -> deck-collage.png
|
|
63
|
+
pptd pdf deck.pptd # all slides -> deck.pdf
|
|
64
|
+
pptd pdf 1,2,3 deck.pptd # selected slides -> deck.pdf
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
PNG and PDF export require LibreOffice (`soffice` on `PATH`).
|
|
68
|
+
|
|
69
|
+
## Python API
|
|
70
|
+
|
|
71
|
+
```python
|
|
72
|
+
from pptd_utils import convert, build, verify
|
|
73
|
+
from pptd_utils import slides_image
|
|
74
|
+
|
|
75
|
+
convert("deck.pptd", "out.pptx") # build + verify + print summary
|
|
76
|
+
build("deck.pptd", "out.pptx") # -> (n_slides, n_fonts)
|
|
77
|
+
verify("deck.pptd", "out.pptx") # structural self-check (asserts)
|
|
78
|
+
|
|
79
|
+
slides_image.render_collage("deck.pptd", "collage.png",
|
|
80
|
+
tile_w=480, gap=20, bg="#1F2430")
|
|
81
|
+
slides_image.render_slide("deck.pptd", 3, "slide3.png")
|
|
82
|
+
slides_image.render_slide_images("deck.pptd", "outdir/",
|
|
83
|
+
slides=[1, 3, 5]) # -> [(n, Path), ...]
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Supported features (PPTD v2)
|
|
87
|
+
|
|
88
|
+
| Area | Coverage |
|
|
89
|
+
|---|---|
|
|
90
|
+
| text | full HTML tag set (strong/em/u/s/sup/sub/a/br/ul/ol/span style attrs), LaTeX runs, gradient + shadow text, letterSpacing, lineHeight / lineHeightPx, bullets/numbering, vertical text, hyperlinks, highlight |
|
|
91
|
+
| shapes | all 130 preset shapeNames (adjustments), custom SVG paths (`M/L/H/V/C/S/Q/A/Z`, multi-subpath holes), rotation/flip/opacity, gradient/radial fills |
|
|
92
|
+
| lines | sharp / smooth / round (fillet) curves, arrows (head/tail), dash styles |
|
|
93
|
+
| images | fit cover/contain/fill, crop (inset + negative outset padding), cropShape (any preset or custom path), opacity, border, shadow |
|
|
94
|
+
| icons | Font Awesome 6/7 free (fas/far/fab), solid + gradient fill, outline, shadow |
|
|
95
|
+
| tables | rowSpan/colSpan merges, theme tableStyles + inline, per-cell style chains, BorderSpec (per-side / null-clear), gradient cell fills, fontSize auto-fit |
|
|
96
|
+
| charts — native (editable) | bar (stacked/clustered/horizontal), line (smooth/dash/markers), area, scatter, bubble, pie/donut, radar, secondary axes, dataLabels + numberFormat, embedded workbooks |
|
|
97
|
+
| charts — raster (Pillow PNG) | candlestick, waterfall, heatmap (linear/diverging + colorbar), treemap, sunburst, sankey, stream stacks, mixed scatter+cartesian |
|
|
98
|
+
| animations | 21 effects (entrance/emphasis/exit incl. motion-path) → full `p:timing` tree, click/withPrevious/afterPrevious, repeat, easing |
|
|
99
|
+
| transitions | fade |
|
|
100
|
+
| fonts | customFonts embedding (see optional deps) |
|
|
101
|
+
| misc | page backgrounds (solid/gradient/image), notes, themes ($refs), elementId → animation targeting |
|
|
102
|
+
|
|
103
|
+
## How it works
|
|
104
|
+
|
|
105
|
+
- `pptx` generation: python-pptx + hand-built DrawingML for fills/effects/ordering; charts created via real chart parts (editable in PowerPoint) then plot XML rewritten; unsupported chart types rasterized at 2× and placed as pictures.
|
|
106
|
+
- images: each slide isolated into a one-slide pptx, rendered by LibreOffice headless, composed by Pillow.
|
|
107
|
+
(`ponytail:` one soffice run per slide — switch to single PDF + PyMuPDF for large decks.)
|
|
108
|
+
|
|
109
|
+
## Test
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
python3 tests/run.py # converts full-spec fixture + minimal + ml-smp, asserts structure
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Fixture `tests/fixtures/full/` exercises every feature area — use it as a syntax reference for your own decks.
|
|
116
|
+
|
|
117
|
+
## Notes
|
|
118
|
+
|
|
119
|
+
- Downloads (FA fonts, URL images/fonts) cache under `~/.cache/pptd_utils/`.
|
|
120
|
+
- Defaults follow the spec: MiSans font family, 18pt body, black text.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
pptd_utils/README.md,sha256=mcmmzSsySf4O1-NDcf4shGCMI_C5W77NApwFdMYTJj8,4396
|
|
2
|
+
pptd_utils/__init__.py,sha256=EtAgblSdNxi4s9DitAPVllU92s088WVRtgOzWxT-LoU,340
|
|
3
|
+
pptd_utils/__main__.py,sha256=I0WVsFDX16-IxsgTiX1tUcx9ypuiTkokIaLK2fU5RpI,53
|
|
4
|
+
pptd_utils/_shape_data.py,sha256=l9UUt1T4-G6vGCT16uExQHIDauaLfKkWcAv0M60_cW8,4852
|
|
5
|
+
pptd_utils/anim.py,sha256=-NcTArbAmv-nylIbgRWuz1-eCmmu7_3FjULMUgb_ZKM,14542
|
|
6
|
+
pptd_utils/charts_native.py,sha256=erCXwK0zMsbrRnTHiixhUS8LkFjbZ-hWZT3ZXZRler0,33551
|
|
7
|
+
pptd_utils/charts_raster.py,sha256=CHUCyebnh0X1XSt6swO3JfNlaXoeor8hN35Wb07Xbug,38444
|
|
8
|
+
pptd_utils/fonts.py,sha256=vQe6fagtp9hsSwibtgGfFxy5qQYoNO7iPqr9JhcIOYM,4751
|
|
9
|
+
pptd_utils/icons.py,sha256=TNMIIrKkqdUML6T1RsS8RCyos7i1FYxWUy-3sq5R8TQ,5894
|
|
10
|
+
pptd_utils/images.py,sha256=wNweYjSWj5NBAcQi4L4UArCYND7Twog0Q0Ja89ysYlw,3993
|
|
11
|
+
pptd_utils/lines.py,sha256=N0DCxuBnSJNkLzt5F7W82v7SamnWXvWVlrqvJW36mjM,6676
|
|
12
|
+
pptd_utils/main.py,sha256=6vRuytSHoRr55HbqkE4XJL25LAZpRezTpRDx-tJ8q5I,11033
|
|
13
|
+
pptd_utils/render_text.py,sha256=D5P4W2KnSfhF1rgjNscbESJRSYdyWuGuzVLrcTKqDJ4,9033
|
|
14
|
+
pptd_utils/rich.py,sha256=8du9KKDh_X3TWI3cVlWZvPDquoQPmTVTAx3rBreGpL4,6657
|
|
15
|
+
pptd_utils/shapes.py,sha256=fTYOg28H019qiI6qSTl2AicfV-ip4EmGDr-MiaqX_SU,10743
|
|
16
|
+
pptd_utils/slides_image.py,sha256=VGTqYRhiIlzIuRiFLa8vvTRzv6yR_HNQgUzn4DLagqs,4728
|
|
17
|
+
pptd_utils/style.py,sha256=9TaVNeKeRaTcHy18HaJGOoNQKmXSGv2VsAxhjLW8bP0,9085
|
|
18
|
+
pptd_utils/tables.py,sha256=qXVdq3JQr8CTPXkU-ewtv1IeJZYhHfHVeui0nP11XrU,9372
|
|
19
|
+
pptd_utils/xmlutil.py,sha256=N8bvWCVetWNS6J9cGOEEEC5zIR74FEKCCch-JXz5tX4,3750
|
|
20
|
+
pptd_utils-2026.10.2.dev3.dist-info/METADATA,sha256=NcX8aqbYuh-CQheG2XrZRiKFzibqeVFbmsKSUUogXSs,5267
|
|
21
|
+
pptd_utils-2026.10.2.dev3.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
|
|
22
|
+
pptd_utils-2026.10.2.dev3.dist-info/entry_points.txt,sha256=LzHVQquV8XdA6OeSKcjC-pNcq7e5V0dnurgTRD04Otw,80
|
|
23
|
+
pptd_utils-2026.10.2.dev3.dist-info/RECORD,,
|