markdown-pptx 1.0.2__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.
- markdown_pptx-1.0.2/.github/workflows/publish-pypi.yml +32 -0
- markdown_pptx-1.0.2/.gitignore +5 -0
- markdown_pptx-1.0.2/LICENSE +21 -0
- markdown_pptx-1.0.2/PKG-INFO +255 -0
- markdown_pptx-1.0.2/README.md +227 -0
- markdown_pptx-1.0.2/pyproject.toml +52 -0
- markdown_pptx-1.0.2/sample/showcase-local.png +0 -0
- markdown_pptx-1.0.2/sample/showcase.md +179 -0
- markdown_pptx-1.0.2/sample/showcase.pptx +0 -0
- markdown_pptx-1.0.2/sample/template-showcase.md +195 -0
- markdown_pptx-1.0.2/sample/template-showcase.pptx +0 -0
- markdown_pptx-1.0.2/sample/template.pptx +0 -0
- markdown_pptx-1.0.2/src/markdown_slides/__init__.py +3 -0
- markdown_pptx-1.0.2/src/markdown_slides/assets/color_schemes.json +26 -0
- markdown_pptx-1.0.2/src/markdown_slides/assets/example.pptx +0 -0
- markdown_pptx-1.0.2/src/markdown_slides/assets/syntax.json +67 -0
- markdown_pptx-1.0.2/src/markdown_slides/assets.py +33 -0
- markdown_pptx-1.0.2/src/markdown_slides/cli.py +253 -0
- markdown_pptx-1.0.2/src/markdown_slides/errors.py +105 -0
- markdown_pptx-1.0.2/src/markdown_slides/markdown_body.py +285 -0
- markdown_pptx-1.0.2/src/markdown_slides/models.py +133 -0
- markdown_pptx-1.0.2/src/markdown_slides/parser.py +533 -0
- markdown_pptx-1.0.2/src/markdown_slides/renderer.py +753 -0
- markdown_pptx-1.0.2/tests/conftest.py +10 -0
- markdown_pptx-1.0.2/tests/test_cli.py +362 -0
- markdown_pptx-1.0.2/tests/test_parser.py +155 -0
- markdown_pptx-1.0.2/tests/test_renderer.py +443 -0
- markdown_pptx-1.0.2/uv.lock +457 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types:
|
|
6
|
+
- published
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
id-token: write
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
publish:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- name: Check out repository
|
|
19
|
+
uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- name: Set up Python
|
|
22
|
+
uses: actions/setup-python@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version: "3.12"
|
|
25
|
+
|
|
26
|
+
- name: Build distributions
|
|
27
|
+
run: |
|
|
28
|
+
python -m pip install --upgrade build
|
|
29
|
+
python -m build
|
|
30
|
+
|
|
31
|
+
- name: Publish to PyPI
|
|
32
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 John Paul Ellis
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: markdown-pptx
|
|
3
|
+
Version: 1.0.2
|
|
4
|
+
Summary: Convert constrained Markdown slide decks into editable PowerPoint presentations.
|
|
5
|
+
Project-URL: Homepage, https://github.com/pseudosavant/markdown-pptx
|
|
6
|
+
Project-URL: Repository, https://github.com/pseudosavant/markdown-pptx
|
|
7
|
+
Project-URL: Issues, https://github.com/pseudosavant/markdown-pptx/issues
|
|
8
|
+
Project-URL: Releases, https://github.com/pseudosavant/markdown-pptx/releases
|
|
9
|
+
Author: John Paul Ellis
|
|
10
|
+
License: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: cli,markdown,powerpoint,pptx,presentation,slides
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Topic :: Office/Business :: Office Suites
|
|
20
|
+
Classifier: Topic :: Software Development :: Documentation
|
|
21
|
+
Classifier: Topic :: Text Processing :: Markup
|
|
22
|
+
Requires-Python: >=3.11
|
|
23
|
+
Requires-Dist: httpx>=0.27
|
|
24
|
+
Requires-Dist: markdown-it-py>=3.0
|
|
25
|
+
Requires-Dist: python-pptx>=1.0.2
|
|
26
|
+
Requires-Dist: pyyaml>=6.0
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
|
|
29
|
+
# markdown-pptx
|
|
30
|
+
|
|
31
|
+
`markdown-pptx` is a Markdown-to-PowerPoint CLI for both people and agents. You can use it directly from the terminal, but the format and CLI are intentionally designed to be easy for coding agents to use reliably, and this extends their natural strength with Markdown into generating real, editable PowerPoint slides instead of plain text outlines or ad hoc exports.
|
|
32
|
+
|
|
33
|
+
It converts constrained Markdown slide decks into editable PowerPoint `.pptx` presentations using real PowerPoint layouts and placeholders. The format is intentionally strict: each `# H1` starts a slide, YAML front matter controls document and slide behavior, and the tool exposes inspection-friendly modes like `--syntax`, `--list-layouts`, and `--list-color-schemes` while failing on ambiguous mappings instead of inventing free-positioned text boxes.
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
## Install
|
|
37
|
+
|
|
38
|
+
### Run directly with uvx
|
|
39
|
+
|
|
40
|
+
```powershell
|
|
41
|
+
uvx markdown-pptx --help
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Install as a tool
|
|
45
|
+
|
|
46
|
+
```powershell
|
|
47
|
+
uv tool install markdown-pptx
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## CLI
|
|
51
|
+
|
|
52
|
+
```powershell
|
|
53
|
+
markdown-pptx deck.md
|
|
54
|
+
markdown-pptx deck.md out.pptx
|
|
55
|
+
markdown-pptx deck.md --ignore-document-colors
|
|
56
|
+
markdown-pptx deck.md --ignore-document-colors --ignore-slide-colors
|
|
57
|
+
markdown-pptx --list-layouts
|
|
58
|
+
markdown-pptx --list-color-schemes
|
|
59
|
+
markdown-pptx --syntax
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
When you use `--template`, the template's existing theme colors and theme fonts are kept unless the markdown explicitly sets `color_scheme` or `fonts`.
|
|
63
|
+
|
|
64
|
+
`--ignore-document-colors` ignores document-level markdown color settings (`color_scheme`, `title_color`, `body_color`, and non-image document backgrounds). `--ignore-slide-colors` ignores slide-level `title_color`, `body_color`, and non-image slide backgrounds. Use both flags together to let the template provide all colors while still keeping the markdown content and layouts.
|
|
65
|
+
|
|
66
|
+
## Format
|
|
67
|
+
|
|
68
|
+
### Document structure
|
|
69
|
+
|
|
70
|
+
1. An optional document front matter block may appear only at the top of the file.
|
|
71
|
+
2. Each `# H1` starts a new slide.
|
|
72
|
+
3. An optional slide front matter block may appear only immediately after an `# H1`.
|
|
73
|
+
4. Everything until the next `# H1` is that slide's body content.
|
|
74
|
+
|
|
75
|
+
### Example deck
|
|
76
|
+
|
|
77
|
+
```markdown
|
|
78
|
+
---
|
|
79
|
+
aspect_ratio: "16:9"
|
|
80
|
+
fonts:
|
|
81
|
+
body: Aptos
|
|
82
|
+
headings: Aptos Display
|
|
83
|
+
color_scheme:
|
|
84
|
+
preset: Office
|
|
85
|
+
title_color: "var(--dark-1)"
|
|
86
|
+
body_color: "var(--dark-1)"
|
|
87
|
+
background: "linear-gradient(90deg, var(--light-1) 0%, var(--light-2) 100%)"
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
# Title slide
|
|
91
|
+
---
|
|
92
|
+
layout: Title Slide
|
|
93
|
+
notes: |
|
|
94
|
+
Introduce the deck.
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
Markdown in. Editable PowerPoint out.
|
|
98
|
+
|
|
99
|
+
# Overview
|
|
100
|
+
---
|
|
101
|
+
layout: Title and Content
|
|
102
|
+
background: "linear-gradient(90deg, var(--accent-1) 0%, var(--accent-2) 100%)"
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Goals
|
|
106
|
+
- Keep the markdown readable
|
|
107
|
+
- Use real PowerPoint placeholders
|
|
108
|
+
- Fail on ambiguous mappings
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Document-level front matter
|
|
112
|
+
|
|
113
|
+
These keys are valid only in the opening front matter block at the top of the document:
|
|
114
|
+
|
|
115
|
+
- `aspect_ratio`
|
|
116
|
+
- `"16:9"` or `"4:3"`
|
|
117
|
+
- `fonts`
|
|
118
|
+
- `body`
|
|
119
|
+
- `headings`
|
|
120
|
+
- `color_scheme`
|
|
121
|
+
- `preset: Office`
|
|
122
|
+
- or explicit overrides for the 12 PowerPoint theme colors
|
|
123
|
+
- `background`
|
|
124
|
+
- solid color
|
|
125
|
+
- `linear-gradient(...)`
|
|
126
|
+
- `radial-gradient(...)`
|
|
127
|
+
- `url(...)`
|
|
128
|
+
- `none`
|
|
129
|
+
- `title_color`
|
|
130
|
+
- default color for title placeholders across the deck
|
|
131
|
+
- `body_color`
|
|
132
|
+
- default color for body/subtitle placeholders across the deck
|
|
133
|
+
|
|
134
|
+
### Document front matter example
|
|
135
|
+
|
|
136
|
+
```yaml
|
|
137
|
+
---
|
|
138
|
+
aspect_ratio: "16:9"
|
|
139
|
+
fonts:
|
|
140
|
+
body: Aptos
|
|
141
|
+
headings: Aptos Display
|
|
142
|
+
color_scheme:
|
|
143
|
+
preset: Office
|
|
144
|
+
title_color: "var(--dark-1)"
|
|
145
|
+
body_color: "var(--accent-4)"
|
|
146
|
+
background: "linear-gradient(90deg, var(--light-1) 0%, var(--light-2) 100%)"
|
|
147
|
+
---
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Slide-level front matter
|
|
151
|
+
|
|
152
|
+
These keys are valid only immediately after a slide `# H1`:
|
|
153
|
+
|
|
154
|
+
- `layout`
|
|
155
|
+
- `Title Slide`
|
|
156
|
+
- `Title and Content`
|
|
157
|
+
- `Section Header`
|
|
158
|
+
- `Title Only`
|
|
159
|
+
- `Blank`
|
|
160
|
+
- `background`
|
|
161
|
+
- overrides the document background for that slide
|
|
162
|
+
- `title_color`
|
|
163
|
+
- overrides the document title color for that slide
|
|
164
|
+
- `body_color`
|
|
165
|
+
- overrides the document body color for that slide
|
|
166
|
+
- `hide_background_graphics`
|
|
167
|
+
- hides inherited master graphics on that slide
|
|
168
|
+
- `notes`
|
|
169
|
+
- speaker notes stored in the PPTX notes pane
|
|
170
|
+
|
|
171
|
+
### Slide front matter example
|
|
172
|
+
|
|
173
|
+
```markdown
|
|
174
|
+
# Section break
|
|
175
|
+
---
|
|
176
|
+
layout: Section Header
|
|
177
|
+
background: "linear-gradient(90deg, var(--accent-1) 0%, var(--accent-2) 100%)"
|
|
178
|
+
title_color: "var(--light-1)"
|
|
179
|
+
body_color: "var(--light-1)"
|
|
180
|
+
notes: |
|
|
181
|
+
Introduce the next section.
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
This subtitle is rendered into the Section Header body/subtitle placeholder.
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## Supported color syntax
|
|
188
|
+
|
|
189
|
+
For `title_color`, `body_color`, and color-bearing backgrounds/gradient stops:
|
|
190
|
+
|
|
191
|
+
- Hex: `#0E2841`
|
|
192
|
+
- RGB: `rgb(14, 40, 65)`
|
|
193
|
+
- HSL: `hsl(210, 65%, 15%)`
|
|
194
|
+
- Theme references:
|
|
195
|
+
- `var(--dark-1)`
|
|
196
|
+
- `var(--light-1)`
|
|
197
|
+
- `var(--dark-2)`
|
|
198
|
+
- `var(--light-2)`
|
|
199
|
+
- `var(--accent-1)` through `var(--accent-6)`
|
|
200
|
+
- `var(--hyperlink)`
|
|
201
|
+
- `var(--followed-hyperlink)`
|
|
202
|
+
|
|
203
|
+
## Supported markdown
|
|
204
|
+
|
|
205
|
+
- Paragraphs
|
|
206
|
+
- Bullet lists
|
|
207
|
+
- Ordered lists
|
|
208
|
+
- Nested lists up to three levels
|
|
209
|
+
- `##` through `######` headings inside a slide
|
|
210
|
+
- Emphasis, strong, inline code, links
|
|
211
|
+
- Fenced code blocks
|
|
212
|
+
- Blockquotes
|
|
213
|
+
- Pipe tables
|
|
214
|
+
- Local images
|
|
215
|
+
- Remote images
|
|
216
|
+
|
|
217
|
+
## Layout and rendering rules
|
|
218
|
+
|
|
219
|
+
- `Blank` requires an empty title and empty body.
|
|
220
|
+
- `Title Only` allows no body content.
|
|
221
|
+
- `Title Slide` and `Section Header` render slide body text into the subtitle/body placeholder.
|
|
222
|
+
- `Title and Content` supports either text flow, one image, or one table.
|
|
223
|
+
- Missing required placeholders are treated as errors.
|
|
224
|
+
- The renderer uses real PowerPoint placeholders rather than synthesized text boxes for title/body content.
|
|
225
|
+
|
|
226
|
+
## Unsupported markdown/features
|
|
227
|
+
|
|
228
|
+
- Setext headings
|
|
229
|
+
- Indented code blocks
|
|
230
|
+
- Raw HTML
|
|
231
|
+
- Task lists
|
|
232
|
+
- Footnotes
|
|
233
|
+
- Arbitrary positioning
|
|
234
|
+
- Layered backgrounds
|
|
235
|
+
- Animations
|
|
236
|
+
|
|
237
|
+
## Examples
|
|
238
|
+
|
|
239
|
+
- Sample source deck: `sample/showcase.md`
|
|
240
|
+
- Sample rendered deck: `sample/showcase.pptx`
|
|
241
|
+
- Sample local image: `sample/showcase-local.png`
|
|
242
|
+
|
|
243
|
+
## Development
|
|
244
|
+
|
|
245
|
+
Run tests:
|
|
246
|
+
|
|
247
|
+
```powershell
|
|
248
|
+
uv run pytest
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
Build distributables:
|
|
252
|
+
|
|
253
|
+
```powershell
|
|
254
|
+
uv build
|
|
255
|
+
```
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
# markdown-pptx
|
|
2
|
+
|
|
3
|
+
`markdown-pptx` is a Markdown-to-PowerPoint CLI for both people and agents. You can use it directly from the terminal, but the format and CLI are intentionally designed to be easy for coding agents to use reliably, and this extends their natural strength with Markdown into generating real, editable PowerPoint slides instead of plain text outlines or ad hoc exports.
|
|
4
|
+
|
|
5
|
+
It converts constrained Markdown slide decks into editable PowerPoint `.pptx` presentations using real PowerPoint layouts and placeholders. The format is intentionally strict: each `# H1` starts a slide, YAML front matter controls document and slide behavior, and the tool exposes inspection-friendly modes like `--syntax`, `--list-layouts`, and `--list-color-schemes` while failing on ambiguous mappings instead of inventing free-positioned text boxes.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
### Run directly with uvx
|
|
11
|
+
|
|
12
|
+
```powershell
|
|
13
|
+
uvx markdown-pptx --help
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
### Install as a tool
|
|
17
|
+
|
|
18
|
+
```powershell
|
|
19
|
+
uv tool install markdown-pptx
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## CLI
|
|
23
|
+
|
|
24
|
+
```powershell
|
|
25
|
+
markdown-pptx deck.md
|
|
26
|
+
markdown-pptx deck.md out.pptx
|
|
27
|
+
markdown-pptx deck.md --ignore-document-colors
|
|
28
|
+
markdown-pptx deck.md --ignore-document-colors --ignore-slide-colors
|
|
29
|
+
markdown-pptx --list-layouts
|
|
30
|
+
markdown-pptx --list-color-schemes
|
|
31
|
+
markdown-pptx --syntax
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
When you use `--template`, the template's existing theme colors and theme fonts are kept unless the markdown explicitly sets `color_scheme` or `fonts`.
|
|
35
|
+
|
|
36
|
+
`--ignore-document-colors` ignores document-level markdown color settings (`color_scheme`, `title_color`, `body_color`, and non-image document backgrounds). `--ignore-slide-colors` ignores slide-level `title_color`, `body_color`, and non-image slide backgrounds. Use both flags together to let the template provide all colors while still keeping the markdown content and layouts.
|
|
37
|
+
|
|
38
|
+
## Format
|
|
39
|
+
|
|
40
|
+
### Document structure
|
|
41
|
+
|
|
42
|
+
1. An optional document front matter block may appear only at the top of the file.
|
|
43
|
+
2. Each `# H1` starts a new slide.
|
|
44
|
+
3. An optional slide front matter block may appear only immediately after an `# H1`.
|
|
45
|
+
4. Everything until the next `# H1` is that slide's body content.
|
|
46
|
+
|
|
47
|
+
### Example deck
|
|
48
|
+
|
|
49
|
+
```markdown
|
|
50
|
+
---
|
|
51
|
+
aspect_ratio: "16:9"
|
|
52
|
+
fonts:
|
|
53
|
+
body: Aptos
|
|
54
|
+
headings: Aptos Display
|
|
55
|
+
color_scheme:
|
|
56
|
+
preset: Office
|
|
57
|
+
title_color: "var(--dark-1)"
|
|
58
|
+
body_color: "var(--dark-1)"
|
|
59
|
+
background: "linear-gradient(90deg, var(--light-1) 0%, var(--light-2) 100%)"
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
# Title slide
|
|
63
|
+
---
|
|
64
|
+
layout: Title Slide
|
|
65
|
+
notes: |
|
|
66
|
+
Introduce the deck.
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
Markdown in. Editable PowerPoint out.
|
|
70
|
+
|
|
71
|
+
# Overview
|
|
72
|
+
---
|
|
73
|
+
layout: Title and Content
|
|
74
|
+
background: "linear-gradient(90deg, var(--accent-1) 0%, var(--accent-2) 100%)"
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Goals
|
|
78
|
+
- Keep the markdown readable
|
|
79
|
+
- Use real PowerPoint placeholders
|
|
80
|
+
- Fail on ambiguous mappings
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Document-level front matter
|
|
84
|
+
|
|
85
|
+
These keys are valid only in the opening front matter block at the top of the document:
|
|
86
|
+
|
|
87
|
+
- `aspect_ratio`
|
|
88
|
+
- `"16:9"` or `"4:3"`
|
|
89
|
+
- `fonts`
|
|
90
|
+
- `body`
|
|
91
|
+
- `headings`
|
|
92
|
+
- `color_scheme`
|
|
93
|
+
- `preset: Office`
|
|
94
|
+
- or explicit overrides for the 12 PowerPoint theme colors
|
|
95
|
+
- `background`
|
|
96
|
+
- solid color
|
|
97
|
+
- `linear-gradient(...)`
|
|
98
|
+
- `radial-gradient(...)`
|
|
99
|
+
- `url(...)`
|
|
100
|
+
- `none`
|
|
101
|
+
- `title_color`
|
|
102
|
+
- default color for title placeholders across the deck
|
|
103
|
+
- `body_color`
|
|
104
|
+
- default color for body/subtitle placeholders across the deck
|
|
105
|
+
|
|
106
|
+
### Document front matter example
|
|
107
|
+
|
|
108
|
+
```yaml
|
|
109
|
+
---
|
|
110
|
+
aspect_ratio: "16:9"
|
|
111
|
+
fonts:
|
|
112
|
+
body: Aptos
|
|
113
|
+
headings: Aptos Display
|
|
114
|
+
color_scheme:
|
|
115
|
+
preset: Office
|
|
116
|
+
title_color: "var(--dark-1)"
|
|
117
|
+
body_color: "var(--accent-4)"
|
|
118
|
+
background: "linear-gradient(90deg, var(--light-1) 0%, var(--light-2) 100%)"
|
|
119
|
+
---
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Slide-level front matter
|
|
123
|
+
|
|
124
|
+
These keys are valid only immediately after a slide `# H1`:
|
|
125
|
+
|
|
126
|
+
- `layout`
|
|
127
|
+
- `Title Slide`
|
|
128
|
+
- `Title and Content`
|
|
129
|
+
- `Section Header`
|
|
130
|
+
- `Title Only`
|
|
131
|
+
- `Blank`
|
|
132
|
+
- `background`
|
|
133
|
+
- overrides the document background for that slide
|
|
134
|
+
- `title_color`
|
|
135
|
+
- overrides the document title color for that slide
|
|
136
|
+
- `body_color`
|
|
137
|
+
- overrides the document body color for that slide
|
|
138
|
+
- `hide_background_graphics`
|
|
139
|
+
- hides inherited master graphics on that slide
|
|
140
|
+
- `notes`
|
|
141
|
+
- speaker notes stored in the PPTX notes pane
|
|
142
|
+
|
|
143
|
+
### Slide front matter example
|
|
144
|
+
|
|
145
|
+
```markdown
|
|
146
|
+
# Section break
|
|
147
|
+
---
|
|
148
|
+
layout: Section Header
|
|
149
|
+
background: "linear-gradient(90deg, var(--accent-1) 0%, var(--accent-2) 100%)"
|
|
150
|
+
title_color: "var(--light-1)"
|
|
151
|
+
body_color: "var(--light-1)"
|
|
152
|
+
notes: |
|
|
153
|
+
Introduce the next section.
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
This subtitle is rendered into the Section Header body/subtitle placeholder.
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Supported color syntax
|
|
160
|
+
|
|
161
|
+
For `title_color`, `body_color`, and color-bearing backgrounds/gradient stops:
|
|
162
|
+
|
|
163
|
+
- Hex: `#0E2841`
|
|
164
|
+
- RGB: `rgb(14, 40, 65)`
|
|
165
|
+
- HSL: `hsl(210, 65%, 15%)`
|
|
166
|
+
- Theme references:
|
|
167
|
+
- `var(--dark-1)`
|
|
168
|
+
- `var(--light-1)`
|
|
169
|
+
- `var(--dark-2)`
|
|
170
|
+
- `var(--light-2)`
|
|
171
|
+
- `var(--accent-1)` through `var(--accent-6)`
|
|
172
|
+
- `var(--hyperlink)`
|
|
173
|
+
- `var(--followed-hyperlink)`
|
|
174
|
+
|
|
175
|
+
## Supported markdown
|
|
176
|
+
|
|
177
|
+
- Paragraphs
|
|
178
|
+
- Bullet lists
|
|
179
|
+
- Ordered lists
|
|
180
|
+
- Nested lists up to three levels
|
|
181
|
+
- `##` through `######` headings inside a slide
|
|
182
|
+
- Emphasis, strong, inline code, links
|
|
183
|
+
- Fenced code blocks
|
|
184
|
+
- Blockquotes
|
|
185
|
+
- Pipe tables
|
|
186
|
+
- Local images
|
|
187
|
+
- Remote images
|
|
188
|
+
|
|
189
|
+
## Layout and rendering rules
|
|
190
|
+
|
|
191
|
+
- `Blank` requires an empty title and empty body.
|
|
192
|
+
- `Title Only` allows no body content.
|
|
193
|
+
- `Title Slide` and `Section Header` render slide body text into the subtitle/body placeholder.
|
|
194
|
+
- `Title and Content` supports either text flow, one image, or one table.
|
|
195
|
+
- Missing required placeholders are treated as errors.
|
|
196
|
+
- The renderer uses real PowerPoint placeholders rather than synthesized text boxes for title/body content.
|
|
197
|
+
|
|
198
|
+
## Unsupported markdown/features
|
|
199
|
+
|
|
200
|
+
- Setext headings
|
|
201
|
+
- Indented code blocks
|
|
202
|
+
- Raw HTML
|
|
203
|
+
- Task lists
|
|
204
|
+
- Footnotes
|
|
205
|
+
- Arbitrary positioning
|
|
206
|
+
- Layered backgrounds
|
|
207
|
+
- Animations
|
|
208
|
+
|
|
209
|
+
## Examples
|
|
210
|
+
|
|
211
|
+
- Sample source deck: `sample/showcase.md`
|
|
212
|
+
- Sample rendered deck: `sample/showcase.pptx`
|
|
213
|
+
- Sample local image: `sample/showcase-local.png`
|
|
214
|
+
|
|
215
|
+
## Development
|
|
216
|
+
|
|
217
|
+
Run tests:
|
|
218
|
+
|
|
219
|
+
```powershell
|
|
220
|
+
uv run pytest
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
Build distributables:
|
|
224
|
+
|
|
225
|
+
```powershell
|
|
226
|
+
uv build
|
|
227
|
+
```
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling>=1.27"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "markdown-pptx"
|
|
7
|
+
version = "1.0.2"
|
|
8
|
+
description = "Convert constrained Markdown slide decks into editable PowerPoint presentations."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.11"
|
|
11
|
+
license = { text = "MIT" }
|
|
12
|
+
license-files = ["LICENSE"]
|
|
13
|
+
authors = [{ name = "John Paul Ellis" }]
|
|
14
|
+
keywords = ["markdown", "powerpoint", "pptx", "slides", "presentation", "cli"]
|
|
15
|
+
classifiers = [
|
|
16
|
+
"Development Status :: 3 - Alpha",
|
|
17
|
+
"Intended Audience :: Developers",
|
|
18
|
+
"License :: OSI Approved :: MIT License",
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"Programming Language :: Python :: 3.11",
|
|
21
|
+
"Programming Language :: Python :: 3.12",
|
|
22
|
+
"Topic :: Office/Business :: Office Suites",
|
|
23
|
+
"Topic :: Software Development :: Documentation",
|
|
24
|
+
"Topic :: Text Processing :: Markup",
|
|
25
|
+
]
|
|
26
|
+
dependencies = [
|
|
27
|
+
"httpx>=0.27",
|
|
28
|
+
"markdown-it-py>=3.0",
|
|
29
|
+
"PyYAML>=6.0",
|
|
30
|
+
"python-pptx>=1.0.2",
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
[project.urls]
|
|
34
|
+
Homepage = "https://github.com/pseudosavant/markdown-pptx"
|
|
35
|
+
Repository = "https://github.com/pseudosavant/markdown-pptx"
|
|
36
|
+
Issues = "https://github.com/pseudosavant/markdown-pptx/issues"
|
|
37
|
+
Releases = "https://github.com/pseudosavant/markdown-pptx/releases"
|
|
38
|
+
|
|
39
|
+
[project.scripts]
|
|
40
|
+
markdown-pptx = "markdown_slides.cli:main"
|
|
41
|
+
|
|
42
|
+
[tool.hatch.build.targets.wheel]
|
|
43
|
+
packages = ["src/markdown_slides"]
|
|
44
|
+
|
|
45
|
+
[tool.pytest.ini_options]
|
|
46
|
+
testpaths = ["tests"]
|
|
47
|
+
addopts = "--basetemp=.pytest-tmp"
|
|
48
|
+
|
|
49
|
+
[tool.uv]
|
|
50
|
+
dev-dependencies = [
|
|
51
|
+
"pytest>=8.0",
|
|
52
|
+
]
|
|
Binary file
|