cbitter78 / docker_pandoc

Pandoc docker container

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pandoc Docker container

Pandoc is a universal document converter. It can be used to convert from one markup or mark down document format to another. In my case I want to convert from MarkDown to PDF. There are standard pandoc docker containers. I am creating this one so that I can include the plugins I want.

Running

docker run --rm -ti --volume $PWD/data:/data --volume $PWD/template:/template cbitter78/pandoc:latest

Assumptions

This container assumes you will mount a volume named /data that will contain one or more markdown files to be converted. It also assumes a volume name /template with a header.md and footer.md that it will prepend and append to any markdown in /data. The header.md contains a yaml metadata block that is used to configure pandoc.

The header is where you can set pandoc settings. You can see an example of this in the folder /template which will be the default templates in this container unless you override them with a volume mount.

The container will iterate over all the files in /data and make a PDF for each that will have the header and footer.

Running without assumptions

If you want to just use pandoc any from a prompt override the entrypoint with --entrypoint /bin/bash like this

docker run --rm -ti --entrypoint /bin/bash --volume $PWD/data:/data --volume $PWD/template:/template cbitter78/pandoc:latest

PanDoc Notes

Pandoc-Tricks https://pandoc.org/MANUAL.html#pandocs-markdown

https://pandoc.org/MANUAL.html#extension-raw_html https://pandoc.org/MANUAL.html#extension-inline_notes https://pandoc.org/MANUAL.html#extension-citations

About

Pandoc docker container

License:MIT License


Languages

Language:Dockerfile 74.7%Language:Shell 25.3%