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 UIfont). - 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:
- Python 3.10 or higher or uv: Required to run the Marp2PPTX package.
- 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
- 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
- Prepare your Marp Markdown file (e.g.,
example.marp.md). - Run the Marp2PPTX pipeline:
marp2pptx example.marp.md --open-pptx
- 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file marp2pptx-0.1.5.tar.gz.
File metadata
- Download URL: marp2pptx-0.1.5.tar.gz
- Upload date:
- Size: 38.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c156cce4d47bf926017e445ea714c6aa74840e90591b90cfdc86f48fdfa7efe
|
|
| MD5 |
f46454f49b4e446b6aec859877b3942a
|
|
| BLAKE2b-256 |
c1bc0f6a89ebe2c5588f4503dfd8ff227db45c18d1b63664654ab3476830e26f
|
File details
Details for the file marp2pptx-0.1.5-py3-none-any.whl.
File metadata
- Download URL: marp2pptx-0.1.5-py3-none-any.whl
- Upload date:
- Size: 29.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6fde5594de62da87b4f87a74702a5e5bf33507547f7d8f348088a9216a901080
|
|
| MD5 |
8d81348fd7332e2e69fdf5c50fbe4306
|
|
| BLAKE2b-256 |
272aeabc1858900f3fe594825752c8a23382e4eb0190f072368eae9abe7c1430
|