Skip to main content

Convert Marp Markdown files to polished PPTX presentations

Project description

Marp2PPTX: Enhanced Marp to PowerPoint Conversion

What is Marp2PPTX?

Marp2PPTX is a Python package designed to convert Marp Markdown files into polished, editable PowerPoint presentations. While Marp's own PowerPoint export tool is functional, it has several limitations and issues, such as improper font handling, unnecessary background objects, and fragmented text boxes. Marp2PPTX addresses these issues, ensuring that the exported presentations are clean, professional, and ready for further editing.

Why Use Marp2PPTX?

Marp2PPTX improves upon Marp's default PowerPoint export by:

  • Fixing font rendering issues (e.g., ensuring proper handling of Segoe UI font).
  • Removing unnecessary background objects that bloat the file size.
  • Combining fragmented text boxes into cohesive units.
  • Respecting slide margins to prevent text overflow.
  • Accurately replicating Marp's advanced background image syntax.

This tool is ideal for users who rely on Marp for Markdown-based slide creation but need high-quality, editable PowerPoint files for professional use.

How to Use Marp2PPTX

Prerequisites

Before using Marp2PPTX, ensure you have the following installed:

  1. Python 3.10 or higher or uv: Required to run the Marp2PPTX package.
  2. Marp CLI: The Marp command-line tool is used to generate intermediate HTML files from Markdown. Install it via npm:
    npm install -g @marp-team/marp-cli
    
  3. LibreOffice: Mandatory for the Marp CLI to create editable PowerPoint files. Ensure LibreOffice is installed and accessible from the command line.

Getting Started

Installation

Marp2PPTX is available as marp2pptx on PyPI.

Invoke Marp2PPTX directly with uvx:

uvx marp2pptx --help
uvx marp2pptx .\example.marp.md --open-pptx

Or install Marp2PPTX with uv (recommended), pip, or pipx:

# with uv
uv tool install marp2pptx # Install Marp2PPTX globally.
uv add marp2pptx # Add Marp2PPTX to the current project.

# with pip
pip install marp2pptx

# with pipx
pipx install marp2pptx

Usage

  1. Prepare your Marp Markdown file (e.g., example.marp.md).
  2. Run the Marp2PPTX pipeline:
    marp2pptx example.marp.md --open-pptx
    
  3. The tool will generate the following file:
    • example-m2p.pptx: Final, post-processed PowerPoint file.

Debugging

To keep intermediate files for debugging, use the --debug flag:

marp2pptx example.marp.md --debug

The tool will generate additional files:

  • example-m2p.html: The HTML file generated by Marp CLI.
  • example-m2p-raw.pptx: The raw PowerPoint file generated by Marp CLI before post-processing.

Contributing

Contributions are welcome! If you encounter issues or have suggestions for improvement, please open an issue or submit a pull request.

# Clone the repository 
git clone https://github.com/Fjeldmann/marp2pptx.git

# installing Marp2PPTX locally for development:
cd marp2pptx
uv sync --dev
uv pip install -e .

# run Marp2PPTX with the example file:
marp2pptx --help
marp2pptx .\example.marp.md --open-pptx

# run tests:
pytest 

# uninstall Marp2PPTX after development:
uv pip uninstall marp2pptx

License

This repository is licensed under the MIT License. See the LICENSE file for more details.

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

marp2pptx-0.1.3.tar.gz (35.1 kB view details)

Uploaded Source

Built Distribution

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

marp2pptx-0.1.3-py3-none-any.whl (27.2 kB view details)

Uploaded Python 3

File details

Details for the file marp2pptx-0.1.3.tar.gz.

File metadata

  • Download URL: marp2pptx-0.1.3.tar.gz
  • Upload date:
  • Size: 35.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for marp2pptx-0.1.3.tar.gz
Algorithm Hash digest
SHA256 9c2403d4374973831666238217b586929743fa8fae1ebb1d412c01f30f9acb63
MD5 9f3c0348c554370206ea7de714526407
BLAKE2b-256 f0724858ed6b901b8e545bd9e31611ddd0515ef908e1bb181ae5f55a6338f727

See more details on using hashes here.

File details

Details for the file marp2pptx-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: marp2pptx-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 27.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for marp2pptx-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 df13b62cab3b7f087448b1a3c3b87b259b844cbf2bfd57c6e547b60b1787b5e1
MD5 90b3f29212a9ab0e0d9bc14e8c2b010d
BLAKE2b-256 41611837e3a7b6e843921c0451c1eb0d1ffd4ac9f07e4d93c0fa65e51eeef860

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