Skip to main content

An Agent Skill and Dify plugin to Convert markdown text into files in various formats such as DOCX, XLSX, PDF, PPTX and images.

Project description

Markdown Exporter Logo

Markdown Exporter

An Agent Skill and Dify plugin to Export Markdown Into Powerful Documents

  • Author: bowenliang123

  • Github Repository: GitHub Repo

  • Markdown Exporter can be used as:

Use As Installation
Dify Plugin Platform: Dify
- Install from the Dify Marketplace.
- Guide: Docs for Installing Dify Plugins.
Agent Skills
(standalone)
Platform: SKILL.md is availiable for Any Agent Skills supported platform.
- IDEs / CLIs (Claude Code, Trae, Codebuddy etc.)
- Agent Frameworks ( LangChain DeepAgents, AgentScope etc.).

- Local Import:
Import the source code zip file.

- Remote install:
Run /plugin marketplace add bowenliang123/md_exporter on CLIs, installing as a Clude Marketplace plugin.
Python Package Platform: Python
- md-exporter on PyPI. Install by pip install md-exporter.

โœจ What is Markdown Exporter?

Markdown Exporter is a powerful toolset as an Agent Skill or a Dify plugin and that transforms your Markdown text into a wide variety of professional formats. Whether you need to create polished reports, stunning presentations, organized spreadsheets, or code filesโ€”this tool has you covered.

With support for 15+ output formats, Markdown Exporter bridges the gap between simple text editing and professional document creation, all while maintaining the simplicity and elegance of Markdown syntax.

๐ŸŽฏ Why You'll Love It

  • ๐Ÿš€ Lightning Fast โ€“ Export your Markdown to multiple formats in milliseconds
  • ๐ŸŽจ Customizable โ€“ Use custom templates for DOCX and PPTX to match your brand
  • ๐Ÿ”’ 100% Private โ€“ All processing happens locally, no data ever leaves your environment
  • ๐Ÿ“Š Versatile โ€“ From documents to spreadsheets, presentations to code files
  • ๐ŸŒ Multi-Language Support โ€“ Perfect for international teams and content

๐Ÿ› ๏ธ Introduction and Use Guide

Tools and Supported Formats

Tool Input Output
md_to_docx ๐Ÿ“ Markdown text ๐Ÿ“„ Word document (.docx)
md_to_html ๐ŸŒ HTML file (.html)
md_to_html_text ๐ŸŒ HTML text string
md_to_pdf ๐Ÿ“‘ PDF file (.pdf)
md_to_png ๐Ÿ–ผ๏ธ PNG image(s) of PDF pages
md_to_md ๐Ÿ“ Markdown file (.md)
md_to_ipynb ๐Ÿ““ Jupyter Notebook (.ipynb)
md_to_pptx
๐Ÿ“ Markdown slides
๐ŸŽฏ PowerPoint (.pptx)
md_to_xlsx ๐Ÿ“‹ Markdown tables ๐Ÿ“Š Excel spreadsheet (.xlsx)
md_to_csv ๐Ÿ“‹ CSV file (.csv)
md_to_json ๐Ÿ“ฆ JSON/JSONL file (.json)
md_to_xml ๐Ÿท๏ธ XML file (.xml)
md_to_latex ๐Ÿ“ LaTeX file (.tex)
md_to_codeblock ๐Ÿ’ป Code blocks in Markdown ๐Ÿ“ Code files by language (.py, .js, .sh, etc.)
md_to_linked_image ๐Ÿ–ผ๏ธ Image links in Markdown ๐Ÿ–ผ๏ธ Downloaded image files

๐Ÿ“– Usage Example

Usage Demo

Simply input your Markdown text, select your desired output format, and click export. It's that easy!


๐ŸŽจ Tool Showcase

๐Ÿ“„ Markdown โ†’ DOCX

Create professional Word documents with beautiful formatting.

โœจ Pro Tip: Custom Styling with Templates

The md_to_docx tool supports custom DOCX template files, giving you full control over your document's appearance.

What you can customize:

  • Heading styles (fonts, sizes, colors)
  • Paragraph formatting (spacing, indentation)
  • Table styles and borders
  • List styles and bullets
  • And much more!

Check out the default docx template or create your own. Learn how at Customize or create new styles.

DOCX Example


๐Ÿ“Š Markdown โ†’ XLSX

Convert your Markdown tables into polished Excel spreadsheets with auto-fitted columns and preserved data types.

Input:

| Name    | Age | City        |
|---------|-----|-------------|
| Alice   | 30  | New York    |
| Bowen   | 25  | Guangzhou   |
| Charlie | 35  | Tokyo       |
| David   | 40  | Miami       |

Output: XLSX Example


๐ŸŽฏ Markdown โ†’ PPTX

Turn your Markdown into stunning PowerPoint presentations automatically.

โœจ Syntax Requirements

Supported Features:

  • โœ… Title slides
  • โœ… Column Layout
  • โœ… Tables
  • โœ… Hyperlinks
  • โœ… And more!

๐ŸŽจ Custom Templates:

Use custom PPTX templates with slide masters to match your brand's visual identity. Learn how. Get the default pptx template.

The input Markdown must follows the syntax and guidance in Pandoc Slide Shows.

Input Example:

---
title: Markdown Exporter
author: Bowen Liang
---

# Introduction

## Welcome Slide

Welcome to our Markdown Exporter!

::: notes
Remember to greet the audience warmly.
:::

---

# Section 1: Basic Layouts

## Title and Content

- This is a basic slide with bullet points
- It uses the "Title and Content" layout
- Perfect for simple content presentation

## Two Column Layout

::::: columns
::: column
Left column content:
- Point 1
- Point 2
:::
::: column
Right column content:
- Point A
- Point B
:::
:::::

## Comparison Layout

::::: columns
::: column
Text followed by an image:

![Test Image](https://avatars.githubusercontent.com/u/127165244?s=48&v=4)
:::
::: column
- This triggers the "Comparison" layout
- Useful for side-by-side comparisons
:::
:::::

## Content with Caption

Here's some explanatory text about the image below.

![Test Image](https://avatars.githubusercontent.com/u/127165244?s=48&v=4 "fig:Test Image")

---

# Section 2: Advanced Features

## Code Block

Here's a Python code block:

```python
def greet(name):
    return f"Hello, {name}!"

print(greet("World"))
```

## Table Example

| Column 1 | Column 2 | Column 3 |
|----------|----------|----------|
| Row 1    | Data     | More     |
| Row 2    | Info     | Stuff    |

## Incremental List

::: incremental
- This point appears first
- Then this one
- And finally this one
  :::

## {background-image="https://avatars.githubusercontent.com/u/127165244?s=48&v=4"}

::: notes
This is a slide with a background image and speaker notes only.
The "Blank" layout will be used.
:::

# Conclusion

## Thank You

Thank you for viewing this kitchen sink presentation!

::: notes
Remember to thank the audience and invite questions.
:::

Output: PPTX Example


๐ŸŒ Markdown โ†’ HTML

Transform your Markdown into clean, semantic HTML perfect for web pages.

HTML Example


๐Ÿ“‘ Markdown โ†’ PDF

Generate professional PDF documents perfect for printing or sharing.

PDF Example


๐Ÿ–ผ๏ธ Markdown โ†’ PNG

Convert your Markdown into beautiful PNG images. Great for:

  • Social media posts
  • Documentation screenshots
  • Quick sharing in chat apps

PNG Example


๐Ÿท๏ธ Markdown โ†’ Jupyter Notebook

Transform your Markdown into Jupyter Notebook .ipynb format.

Input Example:

# Example Jupyter Notebook

This is a simplified test markdown file that will be converted to an IPYNB notebook with multiple cells.

## Introduction

This notebook demonstrates the conversion of markdown to IPYNB format.

- It includes markdown formatting
- It has code cells in different languages
- It shows how tables are handled

```python
# Python Code Cell
print("Hello, world!")
x = 10
y = 20
print(f"Sum: {x + y}")
```

## Data Table

Here's a sample table:

| Name  | Score | Occupation |
|-------|-------|------------|
| Alice | 80    | Engineer   |
| Bowen | 90    | Designer   |

## Conclusion

This concludes the simplified test notebook.

Output File: IPYNB Example


๐Ÿ’ป Markdown โ†’ Code Block Files

Effortlessly extract code blocks from your Markdown and save them as individual files, preserving syntax highlighting and formatting.

Supported Languages & File Extensions

Language File Extension Language File Extension
Python .py CSS .css
JavaScript .js YAML .yaml
HTML .html Ruby .rb
Bash .sh Java .java
JSON .json PHP .php
XML .xml Markdown .md
SVG .svg

Code Block Example 1

Pro Tip: Enable compression to bundle all extracted files into a single ZIP archive for easy sharing and organization!

Code Block Example 2 Code Block Example 3


๐Ÿ–ผ๏ธ Markdown โ†’ Linked Images

Automatically download all images referenced in your Markdown.

Linked Image Example


๐Ÿ“‹ Markdown โ†’ CSV

Export your Markdown tables to universal CSV format.

CSV Example


๐Ÿ“ฆ Markdown โ†’ JSON / JSONL

Convert your tables into structured data formats.

JSONL Style (default)

  • One JSON object per line
  • Perfect for streaming and logging

JSONL Example

JSON Array Style

  • All objects in a single array
  • Ideal for API responses

JSON Example


๐Ÿท๏ธ Markdown โ†’ XML

Transform your data into XML format.

XML Example


๐Ÿ“ Markdown โ†’ LaTeX

Generate LaTeX source code for academic and technical documents.

LaTeX Output: LaTeX Example 1

Compiled PDF: LaTeX Example 2


๐Ÿ“ Markdown โ†’ Markdown

Save your Markdown content as a .md file for future use.


๐Ÿ“ข Changelog

Releases are available at

Changelog:

  • 3.5.1

    • Correctly handle code cells by pre-processing markdown input in md_to_ipynb tool
  • 3.5.0:

    • Introduce md_to_ipynb tool for converting Markdown text to Jupyter Notebook (.ipynb) format
    • The md_to_ipynb tool automatically splits markdown content into separate notebook cells
    • Updated logo icon (for the very first time)
  • 3.4.0:

    • [ BREAKING CHANGE ] migrated md_to_pptx tool to use pandoc for conversion for stable features and less dependency footprint.
    • The Markdown input for md_to_pptx tool now must follow the markdown syntax and guidance in Pandoc slides.
  • 3.3.0:

    • Update md_to_pptx from 6.1.1 to 6.2.1
    • Remove md_to_mermaid tool for less installation timecost and footprint for downloading Nodejs runtime
  • 3.2.0:

    • Introduce md_to_mermaid tool for converting Mermaid diagram code blocks in Markdown to PNG images
    • Refactor Agent Skill scripts and entry shell scripts
  • 3.0.0:

    • md_exporter is now ready for Agent Skills and runnable in standalone
      • Add SKILL.md for Agent Skills description
      • Add /scripts for code scripts of all tools as Agent Skills exectuion entry
      • Extract the core file transformation logic into /scripts/lib sharing by both Agent Skills scripts and Dify Plugin
      • Add pyproject.toml as Python project description and dependency management
    • Add automated tests covering all usage of entry of Claude Skills scripts
    • bump md2pptx from 6.1 to 6.1.1 for bug fix in table caption
  • 2.3.0:

    • resolve xlsx generation by skipping irrelevant chars before first table in md_to_xlsx tool
  • 2.2.0:

    • fix CI problems in GitHub Actions
  • 2.1.0:

    • fix remote image fetching in md_to_pptx tool by updating md2pptx to 6.1
  • 2.1.0:

    • fix missing table border in md_to_docx tool by updating default docx template file
    • intercept run-python marco usage in md_to_pptx tool
  • 2.0.0:

    • [ BREAKING CHANGE ] migrate md_to_docx tool to use pandoc for conversion
    • Major improvements in md_to_docx tool
      • support custom styling by using a template DOCX file, setting the fonts, font size, color style for headings, paragraphs, etc.
      • optimized file size in generated docx file
      • better support for multi-language content
    • remove md_to_rst and md_to_epub tools
    • add force_text_value option in md_to_xlsx tool to control whether to force convert all cell values to text string
  • 1.12.0:

    • fix input pptx template file optional in md_to_pptx tool
    • fix error message with file path in cmd assembly in md_to_pptx tool
    • bump md2pptx to 6.0
  • 1.10.2:

    • bump md2pptx from 5.4.4 to 5.4.5
    • bump python-docx from 1.1 to 1.2.0
    • increase PDF generation capacity limit to 500MB
  • 1.10.0:

    • Support output JSONL style in md_to_json tool, as JSON Lines format with one object per line
    • Change the default output style of md_to_json tool to JSONL
    • Minor doc updates in parameter description
  • 1.9.0:

    • Support custom sheet name in md_to_xlsx tool by using headings in Markdown text
    • Force convert column type to string in md_to_xlsx tool to prevent data precision loss and display issues in Microsoft Excel
    • Autofit column width in md_to_xlsx tool
  • 1.8.0:

    • Solve issues with garbled characters when opening CSV files containing non-ASCII characters (eg. Chinese or Japanese characters, Emoji characters etc.) in Microsoft Excel
  • 1.7.0:

    • Support custom PPTX template file in md_to_pptx tool
    • Support file generation from multiple tables in md_to_csv, md_to_latex, md_to_xlsx tools
  • 1.6.0:

    • Introducing md_to_html_text tool, support converting Markdown text to HTML text
    • Standardize fonts for headings and body paragraphs DOCX file generated by md_to_docx tool
  • 1.5.0:

    • Improve PDF display for pure English markdown text input in md_to_pdf tool, by skipping the font setting for CJK characters
    • Introduce md_to_epub tool, support converting Markdown text to EPUB eBook files
    • Support compressing all png files in single zip file in md_to_png tool
    • Increase capacity limit for PDF file to 100MB in md_to_pdf tool
    • Remove explicit timeout config MAX_REQUEST_TIMEOUT
  • 1.4.100:

    • Special version for celebrating Dify's 100k GitHub stars milestone
    • add md_to_png tool, support converting Markdown text to PNG image files
  • 1.3.0:

    • update SDK version
  • 1.2.0:

    • Support compressing images to single zip file in md_to_linked_image tool
  • 1.1.0:

    • Enable line breaks normalization in all tools by default, replacing all the occurrences of \\n to \n
    • Remove <think> tags of reasoning content in the input Markdown text
    • Fix missing custom output filename support in md_to_csv, md_to_json, md_to_latex tool
  • 1.0.1:

    • Remove redundant URL safe conversion in custom output filename
  • 1.0.0:

    • Support customize the output file name
  • 0.5.0:

    • Introducing md_to_linked_image tool, support extracting image files in links in Markdown text
  • 0.4.3:

    • improve the display of Chinese characters in text paragraph in md_to_docx tool, by setting global font to Song if content contains Chinese - improve the display of Chinese characters in text paragraph in md_to_docx tool, by setting global font to Song if content contains Chinese charactor
  • 0.4.2:

    • support Java, PHP and Ruby file exporting in md_to_codeblocks tool
  • 0.4.1:

    • support YAML file exporting in md_to_codeblocks tool
  • 0.4.0:

    • support exporting Markdown codeblocks in to single zip file in md_to_codeblocks tool
  • 0.3.0:

    • Fixed the error in importing libraries of md_to_pptx tool when running on self-hosted Dify plugin-daemon service
  • 0.2.0:

    • Introducing md_to_codeblock tool, support extracting code blocks in Markdown to Python, JSON, JS, BASH, SVG, HTML, XML, MARKDOWN files.
    • Introducing md_to_rst tool, support reStructuredText .rst file format as destination file format
  • 0.1.x:

    • Introducing md_to_pptx tool, support PowerPoint .pptx file format as destination file format
  • 0.0.x:

    • Published to Dify Marketplace
    • support exporting Markdown to DOCX, PPTX, XLSX, PDF, HTML, MD, CSV, JSON, XML, LaTex files

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit issues or pull requests on our GitHub repository.

Code Style

We use ruff to ensure code consistency. Run the following command to automatically fix code style issues:

uv run ruff check --fix --select UP .

Or use the provided script:

uv run dev.reformat.sh

๐Ÿ“œ License

This project is licensed under the Apache License 2.0.


๐Ÿ”’ Privacy

Your privacy matters. This plugin:

  • Collects NO data
  • Processes everything locally
  • Sends NO information to third-party services

All file transformations happen entirely within your environment.


๐Ÿ™ Acknowledgments

This project stands on the shoulders of giants. We're grateful to these amazing open-source projects:

Project License

| pypandoc | MIT License | | pandas | BSD 3-Clause License |

| xhtml2pdf | Apache License 2.0 |

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

md_exporter-3.5.1.tar.gz (83.8 kB view details)

Uploaded Source

Built Distribution

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

md_exporter-3.5.1-py3-none-any.whl (116.7 kB view details)

Uploaded Python 3

File details

Details for the file md_exporter-3.5.1.tar.gz.

File metadata

  • Download URL: md_exporter-3.5.1.tar.gz
  • Upload date:
  • Size: 83.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for md_exporter-3.5.1.tar.gz
Algorithm Hash digest
SHA256 f81c69f4d1919511f44cb4dc93a643b5c883d0d0d4d3027a09cc5c58ebf233bc
MD5 6014b1c60e9073ba0da47da9d3adc16f
BLAKE2b-256 a777e48214b25ae6c01f5aedd008faec3bf05cc904ffb852beba40750a38cc41

See more details on using hashes here.

Provenance

The following attestation bundles were made for md_exporter-3.5.1.tar.gz:

Publisher: python-publish.yml on bowenliang123/md_exporter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file md_exporter-3.5.1-py3-none-any.whl.

File metadata

  • Download URL: md_exporter-3.5.1-py3-none-any.whl
  • Upload date:
  • Size: 116.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for md_exporter-3.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b8d8dda98ff7dacd411051e2439b77f66708c7754c67257e394521f9a84ae503
MD5 c25fd4cac18c70ecd39ca044f25bf561
BLAKE2b-256 16190d064c12f3246af0b8bd6aafb56641fe12889136cc828fc0f0b5c5ad0b38

See more details on using hashes here.

Provenance

The following attestation bundles were made for md_exporter-3.5.1-py3-none-any.whl:

Publisher: python-publish.yml on bowenliang123/md_exporter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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