# Pandoc Generator (Pelidoc) A Pelican plugin to use Pandoc software. Pandoc is a powerful tool to transform text from different formats (e.g. ReST, Markdown) to others. It is really helpful to generate PDF or EPUB. It also can easily replace the "official" PDF plugin. This plugin provides a powerful interface to handle document generation through Pandoc. Markdown parsing is done in MultiMarkdown to be able to parse metadata information easily. ## Installation You need to have [Pandoc](http://johnmacfarlane.net/pandoc/) (!) and [pypandoc](https://github.com/bebraw/pypandoc), a Python module wrapper for Pandoc, installed on your system. You can install pypandoc with `pip`: ```bash $ pip install pypandoc ``` Then, put the plugin directory in your plugin directory. For instance, create a `./plugins` directory in your Pelican project and add these lines in your `pelicanconf.py` file: ```python PLUGIN_PATHS = ['plugins'] PLUGINS = ['Pelidoc'] ``` Obviously, you'll have to adapt instructions if you already have installed some plugins. To use this plugin then, you'll need to set a `PANDOC_OUTPUTS` configuration variable. It is a dictionary where the keys are the output formats and the values are the corresponding destination directories. For instance: ```python PANDOC_OUTPUTS = { 'pdf': 'pdfs', 'epub': 'epubs', } ``` Note you'll have to modify your theme template to support download of files. Here is a snippet to download files (PDF or EPUB) of a specific article. You can put it in the `templates/article_infos.html` file (or similar) of your theme: ```jinja {% if 'pdf' in PANDOC_OUTPUTS or 'epub' in PANDOC_OUTPUTS %}