Pandoc Cheat Sheet
Pandoc (universal document converter) cheat sheet with useful Pandoc commands.
Working on directories
This section contains examples for using Pandoc to convert all files in a directory. The examples apply to the current directory (./
). Adjust this part if needed.
Convert all Markdown (.md
) files in directory to .pdf
:
find ./ -iname "*.md" -type f -exec sh -c 'pandoc "${0}" -o "${0%.md}.pdf"' {} \;
Convert all Microsoft Word (.docx
) files in directory to .html
:
find ./ -iname "*.docx" -type f -exec sh -c 'pandoc "${0}" -o "${0%.docx}.html"' {} \;