{ "info": { "author": "Konstantin Molchanov", "author_email": "moigagoo@live.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.6", "Topic :: Documentation", "Topic :: Utilities" ], "description": "# Pandoc Backend for Foliant\n\n[Pandoc](http://pandoc.org/) is a Swiss-army knife document converter. It converts almost any format to any other format: md to pdf, rst to html, adoc to docx, and so on and so on.\n\nPandoc backend for Foliant add `pdf`, `docx`, and `tex` targets.\n\n\n## Installation\n\n```shell\n$ pip install foliantcontrib.pandoc\n```\n\nYou also need to install Pandoc and TeXLive distribution for your platform.\n\n## Usage\n\nBuild pdf:\n\n```shell\n$ foliant make pdf -p my-project\n\u2714 Parsing config\n\u2714 Applying preprocessor flatten\n\u2714 Making pdf with Pandoc\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nResult: My_Project-2017-12-04.pdf\n```\n\nBuild docx:\n\n```shell\n$ foliant make docx -p my-project\n\u2714 Parsing config\n\u2714 Applying preprocessor flatten\n\u2714 Making docx with Pandoc\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nResult: My_Project-2017-12-04.docx\n```\n\nBuild tex (mostly for pdf debugging):\n\n```shell\n$ foliant make tex -p my-project\n\u2714 Parsing config\n\u2714 Applying preprocessor flatten\n\u2714 Making docx with Pandoc\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nResult: My_Project-2017-12-04.tex\n```\n\n\n## Config\n\nYou don't have to put anything in the config to use Pandoc backend. If it's installed, Foliant will detect it.\n\nYou can however customize the backend with options in `backend_config.pandoc` section:\n\n```yaml\nbackend_config:\n pandoc:\n pandoc_path: pandoc\n template: !path template.tex\n vars:\n ...\n reference_docx: !path reference.docx\n params:\n ...\n filters:\n ...\n markdown_flavor: markdown\n markdown_extensions:\n ...\n slug: My_Awesome_Custom_Slug\n```\n\n`pandoc_path`\n: is the path to `pandoc` executable. By default, it's assumed to be in the `PATH`.\n\n`template`\n: is the path to the TeX template to use when building pdf and tex (see [\u201cTemplates\u201d](http://pandoc.org/MANUAL.html#templates) in the Pandoc documentation).\n\n > **Tip**\n >\n > Use `!path` tag to ensure the value is converted into a valid path relative to the project directory.\n\n`vars`\n: is a mapping of template variables and their values.\n\n`reference_docx`\n: is the path to the reference document to used when building docx (see [\u201cTemplates\u201d](http://pandoc.org/MANUAL.html#templates) in the Pandoc documentation).\n\n > **Tip**\n >\n > Use `!path` tag to ensure the value is converted into a valid path relative to the project directory.\n\n`params`\n: are passed to the `pandoc` command. Params should be defined by their long names, with dashes replaced with underscores (e.g. `--pdf-engine` is defined as `pdf_engine`).\n\n`filters`\n: is a list of Pandoc filters to be applied during build.\n\n`markdown_flavor`\n: is the Markdown flavor assumed in the source. Default is `markdown`, [Pandoc's extended Markdown](http://pandoc.org/MANUAL.html#pandocs-markdown). See [\u201cMarkdown Variants\u201d](http://pandoc.org/MANUAL.html#markdown-variants) in the Pandoc documentation.\n\n`markdown_extensions`\n: is a list of Markdown extensions applied to the Markdown source. See [Pandoc\u2019s Markdown](http://pandoc.org/MANUAL.html#pandocs-markdown) in the Pandoc documentation.\n\n`slug`\n: is the result file name without suffix (e.g. `.pdf`). Overrides top-level config option `slug`.\n\nExample config:\n\n```yaml\nbackend_config:\n pandoc:\n template: !path templates/basic.tex\n vars:\n toc: true\n title: This Is a Title\n second_title: This Is a Subtitle\n logo: !path templates/logo.png\n year: 2017\n params:\n pdf_engine: xelatex\n listings: true\n number_sections: true\n markdown_extensions:\n - simple_tables\n - fenced_code_blocks\n - strikeout\n```\n\n\n## Troubleshooting\n\n### Could not convert image ...: check that rsvg2pdf is in path\n\nIn order to use svg images in pdf, you need to have `rsvg-convert` executable in `PATH`.\n\nOn macOS, `brew install librsvg` does the trick. On Ubuntu, `apt install librsvg2-bin`. On Windows, [download `rsvg-convert.7z`](http://opensourcepack.blogspot.ru/2012/06/rsvg-convert-svg-image-conversion-tool.html) (without fontconfig support), unpack `rsvg-convert.exe`, and put it anywhere in `PATH`. For example, you can put it in the same directory where you run `foliant make`.\n\n### LaTeX listings package does not work correctly with non-ASCII characters, e.g. Cyrillic letters\n\nIf you use non-ASCII characters inside backticks in your document, you can see an error like this:\n\n```bash\nError producing PDF.\n! Undefined control sequence.\n\\lst@arg ->git clone [SSH-\u043a\n \u043b\u044e\u0447]\nl.627 ...through{\\lstinline!git clone [SSH-\u043a\u043b\u044e\u0447]!}\n```\n\nTo fix it, set `listings` parameter to `false`:\n\n```yaml\nbackend_config:\n pandoc:\n ...\n params:\n pdf_engine: xelatex\n listings: false\n number_sections: true\n ...\n```\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/foliant-docs/foliantcontrib.pandoc", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "foliantcontrib.pandoc", "package_url": "https://pypi.org/project/foliantcontrib.pandoc/", "platform": "any", "project_url": "https://pypi.org/project/foliantcontrib.pandoc/", "project_urls": { "Homepage": "https://github.com/foliant-docs/foliantcontrib.pandoc" }, "release_url": "https://pypi.org/project/foliantcontrib.pandoc/1.0.10/", "requires_dist": null, "requires_python": "", "summary": "Pandoc backend for Foliant doc maker. Produces PDF and DOCX.", "version": "1.0.10" }, "last_serial": 5124576, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "4f355f0e9056e503ca7b70567f8e09a9", "sha256": "c0299be530755857a23f0579457add1c4a204c25b5f6922db156d55f4fdf70d9" }, "downloads": -1, "filename": "foliantcontrib.pandoc-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "4f355f0e9056e503ca7b70567f8e09a9", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 6090, "upload_time": "2017-12-14T11:21:08", "url": "https://files.pythonhosted.org/packages/a7/f2/c88a1ba150c547c8255d1bd2281afcf874a5fde0ee05144ebb8423e5c0c5/foliantcontrib.pandoc-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4b582a050d20610e7f99db224090e0e6", "sha256": "d937f27e4b7fddb15d24530f36f13509063f4c6798ac9a8e3da3576ca0bc4a6d" }, "downloads": -1, "filename": "foliantcontrib.pandoc-1.0.0.tar.gz", "has_sig": false, "md5_digest": "4b582a050d20610e7f99db224090e0e6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3913, "upload_time": "2017-12-14T11:21:10", "url": "https://files.pythonhosted.org/packages/7b/77/1d63e5a1681f944d1b7ac9fb9174a850dce4b726a8bcc6fdfcb738b9e6f1/foliantcontrib.pandoc-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "2920bdb7dcb009dde7b49a226f3e32fa", "sha256": "cca67c370e388687dbd473c582d7d1ae58aacb79899d0126e11f21634e0416fa" }, "downloads": -1, "filename": "foliantcontrib.pandoc-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "2920bdb7dcb009dde7b49a226f3e32fa", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 6733, "upload_time": "2017-12-17T09:03:17", "url": "https://files.pythonhosted.org/packages/6d/10/909a5e0dcc42f8b4e6944631ae24df8bf8009aee10c1549338d2c5e50e68/foliantcontrib.pandoc-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ccfcb450548dd14886bf6492f9953644", "sha256": "4a4d7faa9bfb8e9972ac4151952fb797127503fe4a663e489b0d81a564e1cabb" }, "downloads": -1, "filename": "foliantcontrib.pandoc-1.0.1.tar.gz", "has_sig": false, "md5_digest": "ccfcb450548dd14886bf6492f9953644", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4333, "upload_time": "2017-12-17T09:03:18", "url": "https://files.pythonhosted.org/packages/b1/ae/8c1931b5d9a2a33b901dd426c6dad82820e1d8a68c5bd24cf1082ea4bf52/foliantcontrib.pandoc-1.0.1.tar.gz" } ], "1.0.10": [ { "comment_text": "", "digests": { "md5": "378d660ffad7027e1f3aa4dcf770f5fa", "sha256": "061a666aae80ac72ce8ea42072d6eb98d772230427783a4bdef1fa6b2257c7b4" }, "downloads": -1, "filename": "foliantcontrib.pandoc-1.0.10.tar.gz", "has_sig": false, "md5_digest": "378d660ffad7027e1f3aa4dcf770f5fa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4863, "upload_time": "2019-04-10T15:00:09", "url": "https://files.pythonhosted.org/packages/11/63/5228065092e943097d32c49fefb53f7caee97158697b2536cb05cdc614b5/foliantcontrib.pandoc-1.0.10.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "9f83cc86bd579e42d2f40d770b5d44db", "sha256": "9332007a346d13125bf4ac47a447c0f8930f0e4a35b68b4c558d5ee0a75e218c" }, "downloads": -1, "filename": "foliantcontrib.pandoc-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "9f83cc86bd579e42d2f40d770b5d44db", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 6674, "upload_time": "2018-01-05T08:11:06", "url": "https://files.pythonhosted.org/packages/9d/f7/0ff08df029440bd14b3320984c61d805132ab1bf1c6f573fc173624ba537/foliantcontrib.pandoc-1.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8068c46f5bfaf4ede4534d1d4a70f3c7", "sha256": "346b05cd27af6729df480c7ae743803f031bf8d18dc697fe8d1af9fdc6f2c9b4" }, "downloads": -1, "filename": "foliantcontrib.pandoc-1.0.2.tar.gz", "has_sig": false, "md5_digest": "8068c46f5bfaf4ede4534d1d4a70f3c7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4198, "upload_time": "2018-01-05T08:11:09", "url": "https://files.pythonhosted.org/packages/40/b1/a629cc1d96d762c49181fdab403857b0f260b4c465e10b111feac0e79cb0/foliantcontrib.pandoc-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "511ebfac8f01c48b461fdef07c9a39e5", "sha256": "89887c30090d26e085e11fd61721511701d871d38477fc932cf273087650af65" }, "downloads": -1, "filename": "foliantcontrib.pandoc-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "511ebfac8f01c48b461fdef07c9a39e5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6585, "upload_time": "2018-02-28T17:42:29", "url": "https://files.pythonhosted.org/packages/8a/a1/9f2873b177cc5a9f0335184c03bb0f43a276d6ce998c7585f08262f7987d/foliantcontrib.pandoc-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6a2bc1d1e54ec0deeeb72066c4ece0aa", "sha256": "a6edffd4f6416714f66cd763e64b500d7c7a9e55964b0824214a68403e607d1f" }, "downloads": -1, "filename": "foliantcontrib.pandoc-1.0.3.tar.gz", "has_sig": false, "md5_digest": "6a2bc1d1e54ec0deeeb72066c4ece0aa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3812, "upload_time": "2018-02-28T17:42:30", "url": "https://files.pythonhosted.org/packages/72/b1/899e621d494beb36ee2c97f2d7228cb8ed9ed3b19b731a8a2c4fffd0a551/foliantcontrib.pandoc-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "db545b3a7005a8c94f4226e9fa254827", "sha256": "067b71428aae389bfd5145bca48317d9c38a80369374e25f96f78d0911e31e31" }, "downloads": -1, "filename": "foliantcontrib.pandoc-1.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "db545b3a7005a8c94f4226e9fa254827", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4302, "upload_time": "2018-04-20T10:20:11", "url": "https://files.pythonhosted.org/packages/81/49/4fbf925d15b6b487da449165f1b27eb61a796ad61212c2787ced44d8a7a1/foliantcontrib.pandoc-1.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5710a851f728886402eefefb6b067e88", "sha256": "72c390b5b16e126c877928a89f1fec09d5d10f731d827a84f3aa5397e0df59da" }, "downloads": -1, "filename": "foliantcontrib.pandoc-1.0.4.tar.gz", "has_sig": false, "md5_digest": "5710a851f728886402eefefb6b067e88", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4396, "upload_time": "2018-04-20T10:20:13", "url": "https://files.pythonhosted.org/packages/39/d2/30a51f0e9f311bd58ca1dededec5a946f1af4d9837eb645d32ed4a611c29/foliantcontrib.pandoc-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "770b73ebd7f4cfaa4c9870b698c84c25", "sha256": "4fc08b60269debed9efe38be464d1798dbf6f6dfaf9994f11ff8c281b0d9685b" }, "downloads": -1, "filename": "foliantcontrib.pandoc-1.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "770b73ebd7f4cfaa4c9870b698c84c25", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4388, "upload_time": "2018-05-24T09:56:27", "url": "https://files.pythonhosted.org/packages/16/57/e34d189d85ebc8d0df8624ceb36a11ded6e432d1c69ce20ffcfff8534e23/foliantcontrib.pandoc-1.0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7c9602f4ba5a68b75f36a1f0aabc0098", "sha256": "c56722376e76778cfe596df592e13acbf87613bda254fb070e870ec2726ea6a4" }, "downloads": -1, "filename": "foliantcontrib.pandoc-1.0.5.tar.gz", "has_sig": false, "md5_digest": "7c9602f4ba5a68b75f36a1f0aabc0098", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4486, "upload_time": "2018-05-24T09:56:29", "url": "https://files.pythonhosted.org/packages/00/c7/2fcd1f91c771218edadb37f981c31ba5d6ddb26f9d2d9780f69b1468f2a9/foliantcontrib.pandoc-1.0.5.tar.gz" } ], "1.0.6": [ { "comment_text": "", "digests": { "md5": "dbed14afa3b8294fb163c5fca509e390", "sha256": "889f7ddd4d9f0d8e5626144e65a3e8c306b61dce2552ccb392579aa9eee105f4" }, "downloads": -1, "filename": "foliantcontrib.pandoc-1.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "dbed14afa3b8294fb163c5fca509e390", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4392, "upload_time": "2018-06-04T13:09:19", "url": "https://files.pythonhosted.org/packages/93/f6/17a7d53376b046bac0239eb3d1137034423df141ffb54fc35c4848b4fb86/foliantcontrib.pandoc-1.0.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "60138240eb929f6a645b5bc3c364f2a2", "sha256": "c98df7d94b985c39c14584f5cfcfce090a7b981da4a307af9454f77b16e5f271" }, "downloads": -1, "filename": "foliantcontrib.pandoc-1.0.6.tar.gz", "has_sig": false, "md5_digest": "60138240eb929f6a645b5bc3c364f2a2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4498, "upload_time": "2018-06-04T13:09:20", "url": "https://files.pythonhosted.org/packages/8d/b8/48e186911147b8a493fcac97605aecf91c6f5fcb7fa67f212fc1ec879566/foliantcontrib.pandoc-1.0.6.tar.gz" } ], "1.0.7": [ { "comment_text": "", "digests": { "md5": "cd09dad06adfba018ba308f2adf7c1d2", "sha256": "e18bebfc922208afbdbc3591374164b25b6cd0764b93171ec4814f670cc69152" }, "downloads": -1, "filename": "foliantcontrib.pandoc-1.0.7.tar.gz", "has_sig": false, "md5_digest": "cd09dad06adfba018ba308f2adf7c1d2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4454, "upload_time": "2018-11-14T13:21:44", "url": "https://files.pythonhosted.org/packages/e8/9a/9b745b131e127e4dc8f7d3e8ed7ee38c52c2a38becc52b0608cbdde6a50c/foliantcontrib.pandoc-1.0.7.tar.gz" } ], "1.0.8": [ { "comment_text": "", "digests": { "md5": "ac93db44ca501b03f232bc54f904f33d", "sha256": "02feaad90ab81e2fc92eaa5d4aaccc4cef4d3c6abd0c7b2273dfea0fa199a31f" }, "downloads": -1, "filename": "foliantcontrib.pandoc-1.0.8.tar.gz", "has_sig": false, "md5_digest": "ac93db44ca501b03f232bc54f904f33d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4465, "upload_time": "2018-11-14T17:11:16", "url": "https://files.pythonhosted.org/packages/35/3e/b293d23d8a1a6f853f30b7df4efbf620f7be4048a1191ebae5d00eaa9de5/foliantcontrib.pandoc-1.0.8.tar.gz" } ], "1.0.9": [ { "comment_text": "", "digests": { "md5": "658212bde016f96ef04d55394f3fb70d", "sha256": "e7015f35a2c27bd24579668e106289491bc11773b854f07a5e4e3cc620b0be34" }, "downloads": -1, "filename": "foliantcontrib.pandoc-1.0.9.tar.gz", "has_sig": false, "md5_digest": "658212bde016f96ef04d55394f3fb70d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4850, "upload_time": "2019-04-10T14:32:06", "url": "https://files.pythonhosted.org/packages/a8/ba/bd65dc4003173e7b1816a7b6ec92a723c99c8809ef4b1d5d65609193cc0e/foliantcontrib.pandoc-1.0.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "378d660ffad7027e1f3aa4dcf770f5fa", "sha256": "061a666aae80ac72ce8ea42072d6eb98d772230427783a4bdef1fa6b2257c7b4" }, "downloads": -1, "filename": "foliantcontrib.pandoc-1.0.10.tar.gz", "has_sig": false, "md5_digest": "378d660ffad7027e1f3aa4dcf770f5fa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4863, "upload_time": "2019-04-10T15:00:09", "url": "https://files.pythonhosted.org/packages/11/63/5228065092e943097d32c49fefb53f7caee97158697b2536cb05cdc614b5/foliantcontrib.pandoc-1.0.10.tar.gz" } ] }