markdown-pptx 1.0.2__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.
@@ -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,16 @@
1
+ markdown_slides/__init__.py,sha256=EMaCDcaX3TSCThm5oABhdxr7PzPRHMDvFd42c8aAH-g,49
2
+ markdown_slides/assets.py,sha256=i05tpyUHj2sPHuWaT4tv-YKJz5F-Es29RRa3CxTHvVw,867
3
+ markdown_slides/cli.py,sha256=DK868qVOOQj2WwAm_rNHmNher8JbWryqB7yNOtgG5_0,10713
4
+ markdown_slides/errors.py,sha256=RUOzD6NlHsejIMzSfkYWfGSf4saEnIZiWQWKcvylcD4,2541
5
+ markdown_slides/markdown_body.py,sha256=EUUGVUAprw3cUyJE8cnqUs_U3YiQvb3erX-Ss6n62vw,12225
6
+ markdown_slides/models.py,sha256=ZVsipW0ubYm9NxjRl-K9BvqHWdGT0hl4f28--kSiURA,2904
7
+ markdown_slides/parser.py,sha256=IgYxMzpDrT_An3PowZofNRCB4DtWy2sfLSeNdUSQ2GI,20593
8
+ markdown_slides/renderer.py,sha256=x4FoqqOH_ohR0O_nAGqZaNrYoDw6dBFp5xWa4SIxnio,29573
9
+ markdown_slides/assets/color_schemes.json,sha256=rbe-7655GHaSnWWhxVj7v2pVC8pPpvOQDOEGlIlvMV8,6998
10
+ markdown_slides/assets/example.pptx,sha256=mHaSdgh5ek0jilj2B07qOie6WvqWIN1nqVq2le0iw8c,51537
11
+ markdown_slides/assets/syntax.json,sha256=7XmYkmLTVoGVhLPCjFN8SSXIb3kjLEH0a2qPNgzi66M,2380
12
+ markdown_pptx-1.0.2.dist-info/METADATA,sha256=k8UJPFKRRqcOPH2eiZW0sdQPFlp_c3Ow-IK4R8FqdRg,7213
13
+ markdown_pptx-1.0.2.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
14
+ markdown_pptx-1.0.2.dist-info/entry_points.txt,sha256=JxID7Ls-yWlTm3ll1-YoZtV6krPEQZijwkD6mMlbIgY,59
15
+ markdown_pptx-1.0.2.dist-info/licenses/LICENSE,sha256=y5G-25uHpc5RpDxhxeDRfxe3qPcZGYhSdIvDvDGOkIY,1072
16
+ markdown_pptx-1.0.2.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.29.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ markdown-pptx = markdown_slides.cli:main
@@ -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,3 @@
1
+ __all__ = ["__version__"]
2
+
3
+ __version__ = "1.0.2"
@@ -0,0 +1,26 @@
1
+ [
2
+ {"name":"Aspect","colors":{"dark_1":"#000000","light_1":"#FFFFFF","dark_2":"#323232","light_2":"#E3DED1","accent_1":"#F07F09","accent_2":"#9F2936","accent_3":"#1B587C","accent_4":"#4E8542","accent_5":"#604878","accent_6":"#C19859","hyperlink":"#6B9F25","followed_hyperlink":"#B26B02"}},
3
+ {"name":"Blue Green","colors":{"dark_1":"#000000","light_1":"#FFFFFF","dark_2":"#373545","light_2":"#CEDBE6","accent_1":"#3494BA","accent_2":"#58B6C0","accent_3":"#75BDA7","accent_4":"#7A8C8E","accent_5":"#84ACB6","accent_6":"#2683C6","hyperlink":"#6B9F25","followed_hyperlink":"#9F6715"}},
4
+ {"name":"Blue II","colors":{"dark_1":"#000000","light_1":"#FFFFFF","dark_2":"#335B74","light_2":"#DFE3E5","accent_1":"#1CADE4","accent_2":"#2683C6","accent_3":"#27CED7","accent_4":"#42BA97","accent_5":"#3E8853","accent_6":"#62A39F","hyperlink":"#6EAC1C","followed_hyperlink":"#B26B02"}},
5
+ {"name":"Blue Warm","colors":{"dark_1":"#000000","light_1":"#FFFFFF","dark_2":"#242852","light_2":"#ACCBF9","accent_1":"#4A66AC","accent_2":"#629DD1","accent_3":"#297FD5","accent_4":"#7F8FA9","accent_5":"#5AA2AE","accent_6":"#9D90A0","hyperlink":"#9454C3","followed_hyperlink":"#3EBBF0"}},
6
+ {"name":"Blue","colors":{"dark_1":"#000000","light_1":"#FFFFFF","dark_2":"#17406D","light_2":"#DBEFF9","accent_1":"#0F6FC6","accent_2":"#009DD9","accent_3":"#0BD0D9","accent_4":"#10CF9B","accent_5":"#7CCA62","accent_6":"#A5C249","hyperlink":"#F49100","followed_hyperlink":"#85DFD0"}},
7
+ {"name":"Grayscale","colors":{"dark_1":"#000000","light_1":"#FFFFFF","dark_2":"#000000","light_2":"#F8F8F8","accent_1":"#DDDDDD","accent_2":"#B2B2B2","accent_3":"#969696","accent_4":"#808080","accent_5":"#5F5F5F","accent_6":"#4D4D4D","hyperlink":"#5F5F5F","followed_hyperlink":"#919191"}},
8
+ {"name":"Green Yellow","colors":{"dark_1":"#000000","light_1":"#FFFFFF","dark_2":"#455F51","light_2":"#E2DFCC","accent_1":"#99CB38","accent_2":"#63A537","accent_3":"#37A76F","accent_4":"#44C1A3","accent_5":"#4EB3CF","accent_6":"#51C3F9","hyperlink":"#EE7B08","followed_hyperlink":"#977B2D"}},
9
+ {"name":"Green","colors":{"dark_1":"#000000","light_1":"#FFFFFF","dark_2":"#455F51","light_2":"#E3DED1","accent_1":"#549E39","accent_2":"#8AB833","accent_3":"#C0CF3A","accent_4":"#029676","accent_5":"#4AB5C4","accent_6":"#0989B1","hyperlink":"#6B9F25","followed_hyperlink":"#BA6906"}},
10
+ {"name":"Marquee","colors":{"dark_1":"#000000","light_1":"#FFFFFF","dark_2":"#5E5E5E","light_2":"#DDDDDD","accent_1":"#418AB3","accent_2":"#A6B727","accent_3":"#F69200","accent_4":"#838383","accent_5":"#FEC306","accent_6":"#DF5327","hyperlink":"#F59E00","followed_hyperlink":"#B2B2B2"}},
11
+ {"name":"Median","colors":{"dark_1":"#000000","light_1":"#FFFFFF","dark_2":"#775F55","light_2":"#EBDDC3","accent_1":"#94B6D2","accent_2":"#DD8047","accent_3":"#A5AB81","accent_4":"#D8B25C","accent_5":"#7BA79D","accent_6":"#968C8C","hyperlink":"#F7B615","followed_hyperlink":"#704404"}},
12
+ {"name":"Office","colors":{"dark_1":"#000000","light_1":"#FFFFFF","dark_2":"#0E2841","light_2":"#E8E8E8","accent_1":"#156082","accent_2":"#E97132","accent_3":"#196B24","accent_4":"#0F9ED5","accent_5":"#A02B93","accent_6":"#4EA72E","hyperlink":"#467886","followed_hyperlink":"#96607D"}},
13
+ {"name":"Office 2007-2010","colors":{"dark_1":"#000000","light_1":"#FFFFFF","dark_2":"#1F497D","light_2":"#EEECE1","accent_1":"#4F81BD","accent_2":"#C0504D","accent_3":"#9BBB59","accent_4":"#8064A2","accent_5":"#4BACC6","accent_6":"#F79646","hyperlink":"#0000FF","followed_hyperlink":"#800080"}},
14
+ {"name":"Office 2013 - 2022","colors":{"dark_1":"#000000","light_1":"#FFFFFF","dark_2":"#44546A","light_2":"#E7E6E6","accent_1":"#4472C4","accent_2":"#ED7D31","accent_3":"#A5A5A5","accent_4":"#FFC000","accent_5":"#5B9BD5","accent_6":"#70AD47","hyperlink":"#0563C1","followed_hyperlink":"#954F72"}},
15
+ {"name":"Orange Red","colors":{"dark_1":"#000000","light_1":"#FFFFFF","dark_2":"#696464","light_2":"#E9E5DC","accent_1":"#D34817","accent_2":"#9B2D1F","accent_3":"#A28E6A","accent_4":"#956251","accent_5":"#918485","accent_6":"#855D5D","hyperlink":"#CC9900","followed_hyperlink":"#96A9A9"}},
16
+ {"name":"Orange","colors":{"dark_1":"#000000","light_1":"#FFFFFF","dark_2":"#637052","light_2":"#CCDDEA","accent_1":"#E48312","accent_2":"#BD582C","accent_3":"#865640","accent_4":"#9B8357","accent_5":"#C2BC80","accent_6":"#94A088","hyperlink":"#2998E3","followed_hyperlink":"#8C8C8C"}},
17
+ {"name":"Paper","colors":{"dark_1":"#000000","light_1":"#FFFFFF","dark_2":"#444D26","light_2":"#FEFAC9","accent_1":"#A5B592","accent_2":"#F3A447","accent_3":"#E7BC29","accent_4":"#D092A7","accent_5":"#9C85C0","accent_6":"#809EC2","hyperlink":"#8E58B6","followed_hyperlink":"#7F6F6F"}},
18
+ {"name":"Red Orange","colors":{"dark_1":"#000000","light_1":"#FFFFFF","dark_2":"#505046","light_2":"#EEECE1","accent_1":"#E84C22","accent_2":"#FFBD47","accent_3":"#B64926","accent_4":"#FF8427","accent_5":"#CC9900","accent_6":"#B22600","hyperlink":"#CC9900","followed_hyperlink":"#666699"}},
19
+ {"name":"Red Violet","colors":{"dark_1":"#000000","light_1":"#FFFFFF","dark_2":"#454551","light_2":"#D8D9DC","accent_1":"#E32D91","accent_2":"#C830CC","accent_3":"#4EA6DC","accent_4":"#4775E7","accent_5":"#8971E1","accent_6":"#D54773","hyperlink":"#6B9F25","followed_hyperlink":"#8C8C8C"}},
20
+ {"name":"Red","colors":{"dark_1":"#000000","light_1":"#FFFFFF","dark_2":"#323232","light_2":"#E5C243","accent_1":"#A5300F","accent_2":"#D55816","accent_3":"#E19825","accent_4":"#B19C7D","accent_5":"#7F5F52","accent_6":"#B27D49","hyperlink":"#6B9F25","followed_hyperlink":"#B26B02"}},
21
+ {"name":"Slipstream","colors":{"dark_1":"#000000","light_1":"#FFFFFF","dark_2":"#212745","light_2":"#B4DCFA","accent_1":"#4E67C8","accent_2":"#5ECCF3","accent_3":"#A7EA52","accent_4":"#5DCEAF","accent_5":"#FF8021","accent_6":"#F14124","hyperlink":"#56C7AA","followed_hyperlink":"#59A8D1"}},
22
+ {"name":"Violet II","colors":{"dark_1":"#000000","light_1":"#FFFFFF","dark_2":"#632E62","light_2":"#EAE5EB","accent_1":"#92278F","accent_2":"#9B57D3","accent_3":"#755DD9","accent_4":"#665EB8","accent_5":"#45A5ED","accent_6":"#5982DB","hyperlink":"#0066FF","followed_hyperlink":"#666699"}},
23
+ {"name":"Violet","colors":{"dark_1":"#000000","light_1":"#FFFFFF","dark_2":"#373545","light_2":"#DCD8DC","accent_1":"#AD84C6","accent_2":"#8784C7","accent_3":"#5D739A","accent_4":"#6997AF","accent_5":"#84ACB6","accent_6":"#6F8183","hyperlink":"#69A020","followed_hyperlink":"#8C8C8C"}},
24
+ {"name":"Yellow Orange","colors":{"dark_1":"#000000","light_1":"#FFFFFF","dark_2":"#4E3B30","light_2":"#FBEEC9","accent_1":"#F0A22E","accent_2":"#A5644E","accent_3":"#B58B80","accent_4":"#C3986D","accent_5":"#A19574","accent_6":"#C17529","hyperlink":"#AD1F1F","followed_hyperlink":"#FFC42F"}},
25
+ {"name":"Yellow","colors":{"dark_1":"#000000","light_1":"#FFFFFF","dark_2":"#39302A","light_2":"#E5DEDB","accent_1":"#FFCA08","accent_2":"#F8931D","accent_3":"#CE8D3E","accent_4":"#EC7016","accent_5":"#E64823","accent_6":"#9C6A6A","hyperlink":"#2998E3","followed_hyperlink":"#7F723D"}}
26
+ ]
Binary file
@@ -0,0 +1,67 @@
1
+ {
2
+ "document_front_matter_keys": ["aspect_ratio", "fonts", "color_scheme", "background", "title_color", "body_color"],
3
+ "slide_front_matter_keys": ["layout", "background", "title_color", "body_color", "hide_background_graphics", "notes"],
4
+ "aspect_ratio_values": ["16:9", "4:3"],
5
+ "layout_values": ["Title Slide", "Title and Content", "Section Header", "Title Only", "Blank"],
6
+ "theme_color_syntax": "Use var(--slot-name) in text colors and backgrounds, for example var(--accent-1) or var(--dark-1).",
7
+ "color_scheme_syntax": {
8
+ "preset_example": {
9
+ "preset": "Office"
10
+ },
11
+ "custom_keys": [
12
+ "dark_1",
13
+ "light_1",
14
+ "dark_2",
15
+ "light_2",
16
+ "accent_1",
17
+ "accent_2",
18
+ "accent_3",
19
+ "accent_4",
20
+ "accent_5",
21
+ "accent_6",
22
+ "hyperlink",
23
+ "followed_hyperlink"
24
+ ]
25
+ },
26
+ "supported_markdown": [
27
+ "paragraphs",
28
+ "bullet_lists",
29
+ "ordered_lists",
30
+ "nested_lists_up_to_3_levels",
31
+ "headings_h2_through_h6",
32
+ "emphasis",
33
+ "strong",
34
+ "inline_code",
35
+ "links",
36
+ "fenced_code_blocks",
37
+ "blockquotes",
38
+ "pipe_tables",
39
+ "local_images",
40
+ "remote_images"
41
+ ],
42
+ "unsupported_markdown": [
43
+ "setext_headings",
44
+ "indented_code_blocks",
45
+ "raw_html",
46
+ "task_lists",
47
+ "footnotes",
48
+ "layered_backgrounds",
49
+ "arbitrary_positioning",
50
+ "animations"
51
+ ],
52
+ "theme_color_variables": [
53
+ "var(--dark-1)",
54
+ "var(--light-1)",
55
+ "var(--dark-2)",
56
+ "var(--light-2)",
57
+ "var(--accent-1)",
58
+ "var(--accent-2)",
59
+ "var(--accent-3)",
60
+ "var(--accent-4)",
61
+ "var(--accent-5)",
62
+ "var(--accent-6)",
63
+ "var(--hyperlink)",
64
+ "var(--followed-hyperlink)"
65
+ ],
66
+ "example": "---\naspect_ratio: \"16:9\"\nfonts:\n body: Aptos\n headings: Aptos Display\ncolor_scheme:\n preset: Office\ntitle_color: \"var(--dark-1)\"\nbody_color: \"var(--dark-1)\"\nbackground: \"linear-gradient(90deg, var(--accent-1) 0%, var(--accent-2) 100%)\"\n---\n\n# Title slide\n---\nlayout: Title Slide\nnotes: |\n Introduce the deck.\n---\n\nA concise subtitle line.\n\n# Overview\n---\nlayout: Title and Content\ntitle_color: \"var(--light-1)\"\nbody_color: \"var(--light-1)\"\nbackground: \"linear-gradient(90deg, var(--accent-1) 0%, var(--accent-2) 100%)\"\n---\n\n## Goals\n- Keep the markdown readable\n- Use real PowerPoint placeholders\n- Fail on ambiguous mappings\n"
67
+ }
@@ -0,0 +1,33 @@
1
+ from __future__ import annotations
2
+
3
+ import json
4
+ from functools import lru_cache
5
+ from importlib.resources import files
6
+ from pathlib import Path
7
+ from typing import Any
8
+
9
+
10
+ PACKAGE_ASSETS = files("markdown_slides").joinpath("assets")
11
+
12
+
13
+ def asset_path(name: str) -> Path:
14
+ return Path(str(PACKAGE_ASSETS.joinpath(name)))
15
+
16
+
17
+ @lru_cache(maxsize=1)
18
+ def load_color_schemes() -> dict[str, dict[str, str]]:
19
+ data = json.loads(asset_path("color_schemes.json").read_text(encoding="utf-8"))
20
+ return {item["name"]: item["colors"] for item in data}
21
+
22
+
23
+ def list_color_scheme_names() -> list[str]:
24
+ return sorted(load_color_schemes(), key=str.casefold)
25
+
26
+
27
+ @lru_cache(maxsize=1)
28
+ def load_syntax_payload() -> dict[str, Any]:
29
+ return json.loads(asset_path("syntax.json").read_text(encoding="utf-8"))
30
+
31
+
32
+ def default_template_path() -> Path:
33
+ return asset_path("example.pptx")