sageframe-pptx-builder 0.1.0__tar.gz
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.
- sageframe_pptx_builder-0.1.0/LICENSE +20 -0
- sageframe_pptx_builder-0.1.0/PKG-INFO +282 -0
- sageframe_pptx_builder-0.1.0/README.md +241 -0
- sageframe_pptx_builder-0.1.0/pyproject.toml +84 -0
- sageframe_pptx_builder-0.1.0/setup.cfg +4 -0
- sageframe_pptx_builder-0.1.0/src/pptx_builder/__init__.py +9 -0
- sageframe_pptx_builder-0.1.0/src/pptx_builder/cli.py +9 -0
- sageframe_pptx_builder-0.1.0/src/pptx_builder/core.py +592 -0
- sageframe_pptx_builder-0.1.0/src/pptx_builder/web.py +389 -0
- sageframe_pptx_builder-0.1.0/src/sageframe_pptx_builder.egg-info/PKG-INFO +282 -0
- sageframe_pptx_builder-0.1.0/src/sageframe_pptx_builder.egg-info/SOURCES.txt +13 -0
- sageframe_pptx_builder-0.1.0/src/sageframe_pptx_builder.egg-info/dependency_links.txt +1 -0
- sageframe_pptx_builder-0.1.0/src/sageframe_pptx_builder.egg-info/entry_points.txt +2 -0
- sageframe_pptx_builder-0.1.0/src/sageframe_pptx_builder.egg-info/requires.txt +17 -0
- sageframe_pptx_builder-0.1.0/src/sageframe_pptx_builder.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Tyro Sageframe (Andrew T. Marcus)
|
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
6
|
+
in the Software without restriction, including without limitation the rights
|
|
7
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
9
|
+
furnished to do so, subject to the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be included in all
|
|
12
|
+
copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
+
SOFTWARE.
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sageframe-pptx-builder
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A local-first CLI (and optional Web UI) for converting PDFs and image folders into clean, DPI-controlled PowerPoint slides
|
|
5
|
+
Author-email: Andrew Marcus <andrew@sageframe.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/sageframe-no-kaji/pptx-builder
|
|
8
|
+
Project-URL: Repository, https://github.com/sageframe-no-kaji/pptx-builder
|
|
9
|
+
Project-URL: Issues, https://github.com/sageframe-no-kaji/pptx-builder/issues
|
|
10
|
+
Keywords: powerpoint,pdf,converter,pptx,slides,cli
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Topic :: Office/Business
|
|
21
|
+
Classifier: Topic :: Multimedia :: Graphics :: Presentation
|
|
22
|
+
Requires-Python: >=3.8
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
Requires-Dist: python-pptx>=0.6.21
|
|
26
|
+
Requires-Dist: Pillow>=10.0.0
|
|
27
|
+
Requires-Dist: PyMuPDF>=1.23.0
|
|
28
|
+
Requires-Dist: pdf2image>=1.16.0
|
|
29
|
+
Requires-Dist: pillow-heif>=0.13.0
|
|
30
|
+
Requires-Dist: tqdm>=4.66.0
|
|
31
|
+
Provides-Extra: web
|
|
32
|
+
Requires-Dist: gradio>=4.0.0; extra == "web"
|
|
33
|
+
Provides-Extra: dev
|
|
34
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
35
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
|
|
36
|
+
Requires-Dist: flake8>=6.0.0; extra == "dev"
|
|
37
|
+
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
38
|
+
Requires-Dist: mypy>=1.0.0; extra == "dev"
|
|
39
|
+
Requires-Dist: pre-commit>=3.0.0; extra == "dev"
|
|
40
|
+
Dynamic: license-file
|
|
41
|
+
|
|
42
|
+
# PPTX Builder
|
|
43
|
+
|
|
44
|
+
[](https://opensource.org/licenses/MIT)
|
|
45
|
+
[](https://www.python.org/downloads/)
|
|
46
|
+
[](https://github.com/sageframe-no-kaji/pptx-builder/actions/workflows/test.yml)
|
|
47
|
+
|
|
48
|
+
A local-first CLI (and optional Web UI) for converting PDFs and image folders into clean, DPI-controlled PowerPoint slides — no PowerPoint required.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Quick Start
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
pip install pptx-builder
|
|
56
|
+
pptx-builder -i document.pdf
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Why This Exists
|
|
62
|
+
|
|
63
|
+
* **Privacy**: Process files locally without uploading to online converters.
|
|
64
|
+
* **Predictable output**: A deterministic raster pipeline produces clean slides, avoiding fragile "editable" conversions that attempt unreliable text reconstruction.
|
|
65
|
+
* **Power-tool behavior**: Full control over DPI, aspect ratio, and placement — no surprise auto-fit or re-layout.
|
|
66
|
+
|
|
67
|
+
This tool deliberately favors consistent, high-quality raster output over attempts to reconstruct editable slide content.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Installation
|
|
72
|
+
|
|
73
|
+
### Via pip (Recommended)
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
pip install pptx-builder
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**System dependencies:**
|
|
80
|
+
|
|
81
|
+
* `poppler-utils` (required for PDF conversion)
|
|
82
|
+
|
|
83
|
+
* Debian/Ubuntu: `sudo apt install poppler-utils`
|
|
84
|
+
* macOS: `brew install poppler`
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
### With Web UI (Optional)
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
pip install "pptx-builder[web]"
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Run the web interface:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
python -m pptx_builder.web
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
### Docker (Web UI)
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
git clone https://github.com/sageframe-no-kaji/pptx-builder.git
|
|
106
|
+
cd pptx-builder
|
|
107
|
+
docker compose up -d
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Access the interface at: [http://localhost:7860](http://localhost:7860)
|
|
111
|
+
|
|
112
|
+
See [DOCKER.md](DOCKER.md) for details.
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Usage
|
|
117
|
+
|
|
118
|
+
### CLI (Primary Interface)
|
|
119
|
+
|
|
120
|
+
**Interactive mode:**
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
pptx-builder
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**CLI examples:**
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
# Convert a PDF
|
|
130
|
+
pptx-builder -i document.pdf
|
|
131
|
+
|
|
132
|
+
# Custom output name
|
|
133
|
+
pptx-builder -i document.pdf -o slides.pptx
|
|
134
|
+
|
|
135
|
+
# Higher DPI (slower, sharper)
|
|
136
|
+
pptx-builder -i document.pdf --dpi 600
|
|
137
|
+
|
|
138
|
+
# Process folder of images
|
|
139
|
+
pptx-builder -i photos/
|
|
140
|
+
|
|
141
|
+
# Batch process multiple files
|
|
142
|
+
pptx-builder -i file1.pdf file2.pdf --quiet --force
|
|
143
|
+
|
|
144
|
+
# Process folder recursively
|
|
145
|
+
pptx-builder -i images/ --recursive
|
|
146
|
+
|
|
147
|
+
# Enable verbose logging
|
|
148
|
+
pptx-builder -i document.pdf --verbose
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
**Common options:**
|
|
152
|
+
|
|
153
|
+
* `-i, --input PATH` — Input file(s) or folder
|
|
154
|
+
* `-o, --output NAME` — Output filename (single input only)
|
|
155
|
+
* `--dpi DPI` — PDF rendering quality (default: 300)
|
|
156
|
+
* `-r, --recursive` — Process subfolders
|
|
157
|
+
* `--quiet` — Suppress prompts and non-critical output
|
|
158
|
+
* `--force` — Overwrite existing files
|
|
159
|
+
* `--verbose` — Enable debug logging
|
|
160
|
+
* `-h, --help` — Show all options
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
### Web UI (Secondary Interface)
|
|
165
|
+
|
|
166
|
+
If installed with `[web]` extras or via Docker:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
python -m pptx_builder.web
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Or:
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
docker compose up -d
|
|
176
|
+
# Open http://localhost:7860
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Upload files, select options, download presentation.
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## Features
|
|
184
|
+
|
|
185
|
+
### Supported Formats
|
|
186
|
+
|
|
187
|
+
* PDF (multi-page supported)
|
|
188
|
+
* Images: PNG, JPG, JPEG, TIFF, WebP, BMP, GIF, ICO, HEIC, HEIF
|
|
189
|
+
|
|
190
|
+
### Slide Sizes
|
|
191
|
+
|
|
192
|
+
* 16:9 Widescreen (13.33" × 7.5") — default
|
|
193
|
+
* 4:3 Standard (10" × 7.5")
|
|
194
|
+
* Letter (11" × 8.5")
|
|
195
|
+
* A4 (11.69" × 8.27")
|
|
196
|
+
* Legal (14" × 8.5")
|
|
197
|
+
* Tabloid (17" × 11")
|
|
198
|
+
|
|
199
|
+
### Image Placement Modes
|
|
200
|
+
|
|
201
|
+
* **Fit** — No cropping; entire image visible (default)
|
|
202
|
+
* **Fill** — No whitespace; may crop edges
|
|
203
|
+
|
|
204
|
+
### Output Behavior
|
|
205
|
+
|
|
206
|
+
* One slide per image or PDF page
|
|
207
|
+
* Images sorted alphabetically
|
|
208
|
+
* Centered, never stretched
|
|
209
|
+
* Compatible with PowerPoint, LibreOffice, and Google Slides
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## Documentation
|
|
214
|
+
|
|
215
|
+
* [DOCKER.md](DOCKER.md) — Docker deployment
|
|
216
|
+
* [CONTRIBUTING.md](CONTRIBUTING.md) — Development guidelines
|
|
217
|
+
* [docs/GRADIO_TUTORIAL.md](docs/GRADIO_TUTORIAL.md) — Web UI technical guide
|
|
218
|
+
* [docs/MAN_PAGE_USAGE.md](docs/MAN_PAGE_USAGE.md) — Man page instructions
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
## Development
|
|
223
|
+
|
|
224
|
+
### Setup
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
git clone https://github.com/sageframe-no-kaji/pptx-builder.git
|
|
228
|
+
cd pptx-builder
|
|
229
|
+
pip install -e .[dev]
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### Run Tests
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
pytest
|
|
236
|
+
pytest --cov=pptx_builder --cov-report=html
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
### Code Quality
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
black src/
|
|
243
|
+
flake8 src/pptx_builder/
|
|
244
|
+
mypy src/pptx_builder/
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
### Pre-commit Hooks
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
pre-commit install
|
|
251
|
+
pre-commit run --all-files
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## Notes
|
|
257
|
+
|
|
258
|
+
* 150–300 DPI recommended for most use cases (600 DPI is slower but sharper)
|
|
259
|
+
* Large PDFs (30+ pages) at 300 DPI may take 30–60 seconds
|
|
260
|
+
* Temporary files are cleaned up automatically; no persistent storage is used
|
|
261
|
+
* HEIC/HEIF require `pillow-heif` (included)
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
## Author
|
|
266
|
+
|
|
267
|
+
Created by Andrew T. Marcus
|
|
268
|
+
GitHub: [https://github.com/sageframe-no-kaji](https://github.com/sageframe-no-kaji)
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
## License
|
|
273
|
+
|
|
274
|
+
MIT License — see [LICENSE](LICENSE).
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
## Contributing
|
|
279
|
+
|
|
280
|
+
Issues and pull requests welcome:
|
|
281
|
+
|
|
282
|
+
[https://github.com/sageframe-no-kaji/pptx-builder](https://github.com/sageframe-no-kaji/pptx-builder)
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
# PPTX Builder
|
|
2
|
+
|
|
3
|
+
[](https://opensource.org/licenses/MIT)
|
|
4
|
+
[](https://www.python.org/downloads/)
|
|
5
|
+
[](https://github.com/sageframe-no-kaji/pptx-builder/actions/workflows/test.yml)
|
|
6
|
+
|
|
7
|
+
A local-first CLI (and optional Web UI) for converting PDFs and image folders into clean, DPI-controlled PowerPoint slides — no PowerPoint required.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pip install pptx-builder
|
|
15
|
+
pptx-builder -i document.pdf
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Why This Exists
|
|
21
|
+
|
|
22
|
+
* **Privacy**: Process files locally without uploading to online converters.
|
|
23
|
+
* **Predictable output**: A deterministic raster pipeline produces clean slides, avoiding fragile "editable" conversions that attempt unreliable text reconstruction.
|
|
24
|
+
* **Power-tool behavior**: Full control over DPI, aspect ratio, and placement — no surprise auto-fit or re-layout.
|
|
25
|
+
|
|
26
|
+
This tool deliberately favors consistent, high-quality raster output over attempts to reconstruct editable slide content.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Installation
|
|
31
|
+
|
|
32
|
+
### Via pip (Recommended)
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pip install pptx-builder
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**System dependencies:**
|
|
39
|
+
|
|
40
|
+
* `poppler-utils` (required for PDF conversion)
|
|
41
|
+
|
|
42
|
+
* Debian/Ubuntu: `sudo apt install poppler-utils`
|
|
43
|
+
* macOS: `brew install poppler`
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
### With Web UI (Optional)
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
pip install "pptx-builder[web]"
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Run the web interface:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
python -m pptx_builder.web
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
### Docker (Web UI)
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
git clone https://github.com/sageframe-no-kaji/pptx-builder.git
|
|
65
|
+
cd pptx-builder
|
|
66
|
+
docker compose up -d
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Access the interface at: [http://localhost:7860](http://localhost:7860)
|
|
70
|
+
|
|
71
|
+
See [DOCKER.md](DOCKER.md) for details.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Usage
|
|
76
|
+
|
|
77
|
+
### CLI (Primary Interface)
|
|
78
|
+
|
|
79
|
+
**Interactive mode:**
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
pptx-builder
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**CLI examples:**
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# Convert a PDF
|
|
89
|
+
pptx-builder -i document.pdf
|
|
90
|
+
|
|
91
|
+
# Custom output name
|
|
92
|
+
pptx-builder -i document.pdf -o slides.pptx
|
|
93
|
+
|
|
94
|
+
# Higher DPI (slower, sharper)
|
|
95
|
+
pptx-builder -i document.pdf --dpi 600
|
|
96
|
+
|
|
97
|
+
# Process folder of images
|
|
98
|
+
pptx-builder -i photos/
|
|
99
|
+
|
|
100
|
+
# Batch process multiple files
|
|
101
|
+
pptx-builder -i file1.pdf file2.pdf --quiet --force
|
|
102
|
+
|
|
103
|
+
# Process folder recursively
|
|
104
|
+
pptx-builder -i images/ --recursive
|
|
105
|
+
|
|
106
|
+
# Enable verbose logging
|
|
107
|
+
pptx-builder -i document.pdf --verbose
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
**Common options:**
|
|
111
|
+
|
|
112
|
+
* `-i, --input PATH` — Input file(s) or folder
|
|
113
|
+
* `-o, --output NAME` — Output filename (single input only)
|
|
114
|
+
* `--dpi DPI` — PDF rendering quality (default: 300)
|
|
115
|
+
* `-r, --recursive` — Process subfolders
|
|
116
|
+
* `--quiet` — Suppress prompts and non-critical output
|
|
117
|
+
* `--force` — Overwrite existing files
|
|
118
|
+
* `--verbose` — Enable debug logging
|
|
119
|
+
* `-h, --help` — Show all options
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
### Web UI (Secondary Interface)
|
|
124
|
+
|
|
125
|
+
If installed with `[web]` extras or via Docker:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
python -m pptx_builder.web
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Or:
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
docker compose up -d
|
|
135
|
+
# Open http://localhost:7860
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Upload files, select options, download presentation.
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## Features
|
|
143
|
+
|
|
144
|
+
### Supported Formats
|
|
145
|
+
|
|
146
|
+
* PDF (multi-page supported)
|
|
147
|
+
* Images: PNG, JPG, JPEG, TIFF, WebP, BMP, GIF, ICO, HEIC, HEIF
|
|
148
|
+
|
|
149
|
+
### Slide Sizes
|
|
150
|
+
|
|
151
|
+
* 16:9 Widescreen (13.33" × 7.5") — default
|
|
152
|
+
* 4:3 Standard (10" × 7.5")
|
|
153
|
+
* Letter (11" × 8.5")
|
|
154
|
+
* A4 (11.69" × 8.27")
|
|
155
|
+
* Legal (14" × 8.5")
|
|
156
|
+
* Tabloid (17" × 11")
|
|
157
|
+
|
|
158
|
+
### Image Placement Modes
|
|
159
|
+
|
|
160
|
+
* **Fit** — No cropping; entire image visible (default)
|
|
161
|
+
* **Fill** — No whitespace; may crop edges
|
|
162
|
+
|
|
163
|
+
### Output Behavior
|
|
164
|
+
|
|
165
|
+
* One slide per image or PDF page
|
|
166
|
+
* Images sorted alphabetically
|
|
167
|
+
* Centered, never stretched
|
|
168
|
+
* Compatible with PowerPoint, LibreOffice, and Google Slides
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## Documentation
|
|
173
|
+
|
|
174
|
+
* [DOCKER.md](DOCKER.md) — Docker deployment
|
|
175
|
+
* [CONTRIBUTING.md](CONTRIBUTING.md) — Development guidelines
|
|
176
|
+
* [docs/GRADIO_TUTORIAL.md](docs/GRADIO_TUTORIAL.md) — Web UI technical guide
|
|
177
|
+
* [docs/MAN_PAGE_USAGE.md](docs/MAN_PAGE_USAGE.md) — Man page instructions
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## Development
|
|
182
|
+
|
|
183
|
+
### Setup
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
git clone https://github.com/sageframe-no-kaji/pptx-builder.git
|
|
187
|
+
cd pptx-builder
|
|
188
|
+
pip install -e .[dev]
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### Run Tests
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
pytest
|
|
195
|
+
pytest --cov=pptx_builder --cov-report=html
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### Code Quality
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
black src/
|
|
202
|
+
flake8 src/pptx_builder/
|
|
203
|
+
mypy src/pptx_builder/
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### Pre-commit Hooks
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
pre-commit install
|
|
210
|
+
pre-commit run --all-files
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## Notes
|
|
216
|
+
|
|
217
|
+
* 150–300 DPI recommended for most use cases (600 DPI is slower but sharper)
|
|
218
|
+
* Large PDFs (30+ pages) at 300 DPI may take 30–60 seconds
|
|
219
|
+
* Temporary files are cleaned up automatically; no persistent storage is used
|
|
220
|
+
* HEIC/HEIF require `pillow-heif` (included)
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## Author
|
|
225
|
+
|
|
226
|
+
Created by Andrew T. Marcus
|
|
227
|
+
GitHub: [https://github.com/sageframe-no-kaji](https://github.com/sageframe-no-kaji)
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
## License
|
|
232
|
+
|
|
233
|
+
MIT License — see [LICENSE](LICENSE).
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
## Contributing
|
|
238
|
+
|
|
239
|
+
Issues and pull requests welcome:
|
|
240
|
+
|
|
241
|
+
[https://github.com/sageframe-no-kaji/pptx-builder](https://github.com/sageframe-no-kaji/pptx-builder)
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "sageframe-pptx-builder"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "A local-first CLI (and optional Web UI) for converting PDFs and image folders into clean, DPI-controlled PowerPoint slides"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.8"
|
|
11
|
+
license = {text = "MIT"}
|
|
12
|
+
authors = [
|
|
13
|
+
{name = "Andrew Marcus", email = "andrew@sageframe.com"}
|
|
14
|
+
]
|
|
15
|
+
keywords = ["powerpoint", "pdf", "converter", "pptx", "slides", "cli"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 4 - Beta",
|
|
18
|
+
"Intended Audience :: End Users/Desktop",
|
|
19
|
+
"License :: OSI Approved :: MIT License",
|
|
20
|
+
"Programming Language :: Python :: 3",
|
|
21
|
+
"Programming Language :: Python :: 3.8",
|
|
22
|
+
"Programming Language :: Python :: 3.9",
|
|
23
|
+
"Programming Language :: Python :: 3.10",
|
|
24
|
+
"Programming Language :: Python :: 3.11",
|
|
25
|
+
"Programming Language :: Python :: 3.12",
|
|
26
|
+
"Topic :: Office/Business",
|
|
27
|
+
"Topic :: Multimedia :: Graphics :: Presentation",
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
dependencies = [
|
|
31
|
+
"python-pptx>=0.6.21",
|
|
32
|
+
"Pillow>=10.0.0",
|
|
33
|
+
"PyMuPDF>=1.23.0",
|
|
34
|
+
"pdf2image>=1.16.0",
|
|
35
|
+
"pillow-heif>=0.13.0",
|
|
36
|
+
"tqdm>=4.66.0",
|
|
37
|
+
]
|
|
38
|
+
|
|
39
|
+
[project.optional-dependencies]
|
|
40
|
+
web = [
|
|
41
|
+
"gradio>=4.0.0",
|
|
42
|
+
]
|
|
43
|
+
dev = [
|
|
44
|
+
"pytest>=7.0.0",
|
|
45
|
+
"pytest-cov>=4.0.0",
|
|
46
|
+
"flake8>=6.0.0",
|
|
47
|
+
"black>=23.0.0",
|
|
48
|
+
"mypy>=1.0.0",
|
|
49
|
+
"pre-commit>=3.0.0",
|
|
50
|
+
]
|
|
51
|
+
|
|
52
|
+
[project.urls]
|
|
53
|
+
Homepage = "https://github.com/sageframe-no-kaji/pptx-builder"
|
|
54
|
+
Repository = "https://github.com/sageframe-no-kaji/pptx-builder"
|
|
55
|
+
Issues = "https://github.com/sageframe-no-kaji/pptx-builder/issues"
|
|
56
|
+
|
|
57
|
+
[project.scripts]
|
|
58
|
+
pptx-builder = "pptx_builder.cli:main"
|
|
59
|
+
|
|
60
|
+
[tool.setuptools]
|
|
61
|
+
package-dir = {"" = "src"}
|
|
62
|
+
|
|
63
|
+
[tool.setuptools.packages.find]
|
|
64
|
+
where = ["src"]
|
|
65
|
+
|
|
66
|
+
[tool.black]
|
|
67
|
+
line-length = 100
|
|
68
|
+
target-version = ["py38", "py39", "py310", "py311"]
|
|
69
|
+
|
|
70
|
+
[tool.pytest.ini_options]
|
|
71
|
+
testpaths = ["."]
|
|
72
|
+
python_files = "test_*.py"
|
|
73
|
+
python_classes = "Test*"
|
|
74
|
+
python_functions = "test_*"
|
|
75
|
+
markers = [
|
|
76
|
+
"integration: marks tests as integration tests (deselect with '-m \"not integration\"')",
|
|
77
|
+
]
|
|
78
|
+
addopts = "-v --strict-markers --tb=short"
|
|
79
|
+
|
|
80
|
+
[tool.mypy]
|
|
81
|
+
python_version = "3.8"
|
|
82
|
+
warn_return_any = true
|
|
83
|
+
warn_unused_configs = true
|
|
84
|
+
ignore_missing_imports = true
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"""
|
|
2
|
+
pptx-builder - Convert PDFs and images to PowerPoint presentations
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
__version__ = "0.1.0"
|
|
6
|
+
|
|
7
|
+
from .core import build_presentation, convert_pdf_to_images, list_images
|
|
8
|
+
|
|
9
|
+
__all__ = ["build_presentation", "convert_pdf_to_images", "list_images", "__version__"]
|