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.4.tar.gz (38.5 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.4-py3-none-any.whl (29.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: marp2pptx-0.1.4.tar.gz
  • Upload date:
  • Size: 38.5 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

Hashes for marp2pptx-0.1.4.tar.gz
Algorithm Hash digest
SHA256 b29cef2ceb1169e6f1d3a5b8f0a439c742ac8a115bec88b87386d9f4e7ca481d
MD5 844ba0e92a32aaa5c7d429f5a9864723
BLAKE2b-256 caee22707ed34d958460628a06e1e3fc5b8d145897008697f28b2c97cd2dcaf0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: marp2pptx-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 29.0 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

Hashes for marp2pptx-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7227e036f739fa5c6fbc025d5438d4a42569174bd7c19a24917e636900455a2a
MD5 9d698e34da8a28e23bfe119ed530ff22
BLAKE2b-256 aeb0e22ecc1cfe896864ff3d26bbc54410a7529de898460d0b8cf393f2da76e1

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