mcpField
P
pandoc-converter

pandoc-converter

github.com/jrajasekeraDocuments175 installsUpdated 5w ago
Repository

About pandoc-converter

Pandoc Converter is a skill for converting documents between common formats through Pandoc. It supports document conversions, read-only input for tabular data, and options such as tables of contents and PDF engines.

Key features

  1. 01Convert between common document formats
  2. 02Read CSV, TSV, and XLSX as input
  3. 03Support GFM and CommonMark variants
  4. 04Set input and output formats
  5. 05Add standalone headers and table of contents
  6. 06Pass through Pandoc options

Use cases

  1. 01Convert Markdown files to DOCX, PDF, or HTML
  2. 02Convert DOCX documents to Markdown
  3. 03Turn CSV data into HTML tables
  4. 04Convert LaTeX documents to PDF

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/jrajasekera/jr-agent-skills --skill pandoc-converter

After installing, type/pandoc-converterin Claude Code to confirm it loaded.

Bundled filesreferences/format-compatibility.mdscripts/convert.py

Details

From the project README

Pandoc Converter

Convert documents between common formats using Pandoc.

Quick Start

# Basic conversion (format auto-detected from extensions)
python scripts/convert.py input.md output.docx

# Specify output format only
python scripts/convert.py document.md --to html

# Check if Pandoc is installed
python scripts/convert.py --check

# List supported formats
python scripts/convert.py --formats

Supported Formats

Document formats (read/write): markdown, html, docx, latex, epub, rtf, pptx, pdf
Data formats (read only): csv, tsv, xlsx
Markdown variants: gfm (GitHub), commonmark

For detailed compatibility, see references/format-compatibility.md.

Common Conversions

FromToCommand
MarkdownWordpython scripts/convert.py doc.md doc.docx
MarkdownPDFpython scripts/convert.py doc.md doc.pdf
MarkdownHTMLpython scripts/convert.py doc.md doc.html
WordMarkdownpython scripts/convert.py doc.docx doc.md
CSVHTML tablepython scripts/convert.py data.csv data.html
LaTeXPDFpython scripts/convert.py paper.tex paper.pdf

Options

OptionDescription
--from <fmt>Override input format detection
--to <fmt>Specify output format (if no output file)
--standaloneInclude document headers/footers
--tocAdd table of contents
--pdf-engine <eng>PDF engine: pdflatex, xelatex, lualatex

Additional Pandoc options pass through directly.

Workflow

  1. Check installation: Run python scripts/convert.py --check
  2. If not installed: Follow the installation instructions provided
  3. Convert: Run the conversion with input and output files
  4. Present result: Provide the converted file to the user

Installation (if needed)

The script provides installation guidance, but here's a summary:

# macOS
brew install pandoc

# Ubuntu/Debian  
sudo apt-get install pandoc

# For PDF output, also install LaTeX:
# macOS: brew install --cask mactex-no-gui
# Ubuntu: sudo apt-get install texlive-xetex

Limitations

  • CSV/TSV/XLSX: Input only (converts to tables in other formats)
  • PDF output: Requires LaTeX installation
  • PPTX: Text extraction works; complex layouts may simplify
  • Complex formatting: Some features may not transfer between formats

Comments

Markdown supported