Skip to main content

Convert Markdown files into PowerPoint presentations (.pptx)

Project description

Converts a Markdown file into a .pptx PowerPoint presentation using python-pptx.

Sometimes, you need to make a PowerPoint quickly and you already have the material – it just isn’t in slides format. This package makes it easy to convert a Markdown file into basic PowerPoint slides and sticks with conventional PowerPoint layouts so you can use the “Designer” feature to instantly style the slides.

Why Markdown? Because every LLM can write Markdown, so as long as it follows the conventions below, it can be piped directly into SlidesBuilder to produce a slide deck.

Installation

pip install md2ppt

CLI Usage

md2ppt input.md output.pptx

The CLI applies a built-in ETSU color theme by default.

Module Usage

from md2ppt import SlidesBuilder

with open("input.md") as f:
    md = f.read()

SlidesBuilder(md, "output.pptx").build()

To apply a custom color theme, pass a theme_colors dict with any subset of Office theme slot names (hex strings, no #):

my_colors = {
    "accent1": "1A3C6E",   # primary brand blue
    "accent2": "E87722",   # accent orange
}

SlidesBuilder(md, "output.pptx", theme_colors=my_colors).build()

Valid slot names: dk1, lt1, dk2, lt2, accent1accent6, hlink, folHlink.

Markdown Conventions

Syntax

Result

# Title

Title slide

# Title: Subtitle

Title slide with subtitle

## Heading

Content slide

- item

Bulleted list item

1. item

Numbered item (hanging indent)

Plain paragraph text

Unbulleted body text

Example Input

# My Presentation: A Subtitle

## First Slide

- Bullet point one
- Bullet point two

## Second Slide

1. First numbered item
2. Second numbered item

## Thank You

Contact us at example@example.com

Generating Slides-Compatible Markdown with an LLM

Use a prompt like the following to get an LLM to output Markdown that md2ppt can convert directly:

Generate a slide deck in Markdown format on the topic of “[Your Topic]”.

Follow these formatting rules exactly:

  • Use a single # heading for the title slide. If you want a subtitle, put it after a colon: # Title: Subtitle

  • Use ## headings for each content slide title

  • Use - bullet points for unordered lists

  • Use 1. numbered lists for ordered/ranked content

  • Use plain paragraph text (no prefix) for prose body content

  • Do not use bold, italics, links, code blocks, or any other Markdown formatting

  • Aim for 5–8 slides total, with 4–6 items per content slide

  • Output only the Markdown — no explanation, no preamble

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

md2ppt-0.1.1.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

md2ppt-0.1.1-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file md2ppt-0.1.1.tar.gz.

File metadata

  • Download URL: md2ppt-0.1.1.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.6

File hashes

Hashes for md2ppt-0.1.1.tar.gz
Algorithm Hash digest
SHA256 fcb9abe97d2a8bc0c6dedea0c1cf9ec2729d78da0175fcbcaf802f7504d6cc2d
MD5 2034a9899dcd34db371c42acab83f4d8
BLAKE2b-256 37895b5d6b12cf2f0bbf4b0d0564810ca278855742fdf684e38e3a33d273f54a

See more details on using hashes here.

File details

Details for the file md2ppt-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: md2ppt-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.6

File hashes

Hashes for md2ppt-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ead4a10db21340eb50030bafd2e94936e4545b00a7a2ccccef8d646bb1898b04
MD5 1f63239dac49e05239ef345d006b8035
BLAKE2b-256 cb78be97e817903520e306bd2b46d2aea2a73e179c323a129123237fbf68093c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page