# -*- coding: utf-8 -*-
from setuptools import setup

packages = \
['pypandoc']

package_data = \
{'': ['*']}

setup_kwargs = {
    'name': 'pypandoc',
    'version': '1.7.1',
    'description': 'Thin wrapper for pandoc',
    'long_description': '# pypandoc\n\n[![Build Status](https://travis-ci.com/NicklasTegner/pypandoc.svg?branch=master)](https://travis-ci.com/NicklasTegner/pypandoc)\n[![Appveyor Build Status](https://ci.appveyor.com/api/projects/status/github/NicklasTegner/pypandoc?svg=true)](https://ci.appveyor.com/project/NicklasTegner/pypandoc)\n[![GitHub Releases](https://img.shields.io/github/tag/bebraw/pypandoc.svg?label=github+release)](https://github.com/bebraw/pypandoc/releases)\n[![PyPI version](https://badge.fury.io/py/pypandoc.svg)](https://pypi.python.org/pypi/pypandoc/)\n[![conda version](https://anaconda.org/conda-forge/pypandoc/badges/version.svg)](https://anaconda.org/conda-forge/pypandoc/)\n[![Development Status](https://img.shields.io/pypi/status/pypandoc.svg)](https://pypi.python.org/pypi/pypandoc/)\n[![Python version](https://img.shields.io/pypi/pyversions/pypandoc.svg)](https://pypi.python.org/pypi/pypandoc/)\n![License](https://img.shields.io/pypi/l/pypandoc.svg)\n\nPypandoc provides a thin wrapper for [pandoc](https://pandoc.org), a universal\ndocument converter.\n\n## Installation\n\nPypandoc uses pandoc, so it needs an available installation of pandoc. For some common cases\n(wheels, conda packages), pypandoc already includes pandoc (and pandoc-citeproc) in its\nprebuilt package.\n\nIf pandoc is already installed (i.e. pandoc is in the `PATH`), pypandoc uses the version with the\nhigher version number, and if both are the same, the already installed version. See [Specifying the location of pandoc binaries](#specifying-the-location-of-pandoc-binaries) for more.\n\nTo use pandoc filters, you must have the relevant filters installed on your machine.\n\n### Installing via pip\n\nInstall via `pip install pypandoc`.\n\nPrebuilt [wheels for Windows and Mac OS X](https://pypi.python.org/pypi/pypandoc/) include\npandoc. If there is no prebuilt binary available, you have to\n[install pandoc yourself](#installing-pandoc-manually).\n\nIf you use Linux and have [your own wheelhouse](https://wheel.readthedocs.org/en/latest/#usage),\nyou can build a wheel which include pandoc with\n`python setup.py download_pandoc; python setup.py bdist_wheel`. Be aware that this works only\non 64bit intel systems, as we only download it from the\n[official releases](https://github.com/jgm/pandoc/releases).\n\n### Installing via conda\n\nPypandoc is included in [conda-forge](https://conda-forge.github.io/). The conda packages will\nalso install the pandoc package, so pandoc is available in the installation.\n\nInstall via `conda install -c conda-forge pypandoc`.\n\nYou can also add the channel to your conda config via\n`conda config --add channels conda-forge`. This makes it possible to\nuse `conda install pypandoc` directly and also lets you update via `conda update pypandoc`.\n\n### Installing pandoc\n\nIf you don\'t get pandoc installed via a prebuild wheel which includes pandoc or via the\nconda package dependencies, you need to install pandoc by yourself.\n\n#### Installing pandoc via pypandoc\n\nInstalling via pypandoc is possible on Windows, Mac OS X or Linux (Intel-based, 64-bit):\n\n```python\n# expects an installed pypandoc: pip install pypandoc\nfrom pypandoc.pandoc_download import download_pandoc\n# see the documentation how to customize the installation path\n# but be aware that you then need to include it in the `PATH`\ndownload_pandoc()\n```\n\nThe default install location is included in the search path for pandoc, so you\ndon\'t need to add it to the `PATH`.\n\nBy default, the latest pandoc version is installed. If you want to specify your own version, say 1.19.1, use `download_pandoc(version=\'1.19.1\')` instead.\n\n#### Installing pandoc manually\n\nInstalling manually via the system mechanism is also possible. Such installation mechanism\nmake pandoc available on many more platforms:\n\n- Ubuntu/Debian: `sudo apt-get install pandoc`\n- Fedora/Red Hat: `sudo yum install pandoc`\n- Arch: `sudo pacman -S pandoc`\n- Mac OS X with Homebrew: `brew install pandoc pandoc-citeproc Caskroom/cask/mactex`\n- Machine with Haskell: `cabal-install pandoc`\n- Windows: There is an installer available\n  [here](https://pandoc.org/installing.html)\n- [FreeBSD with pkg:](https://www.freshports.org/textproc/hs-pandoc/) `pkg install hs-pandoc`\n- Or see [Pandoc - Installing pandoc](https://pandoc.org/installing.html)\n\nBe aware that not all install mechanisms put pandoc in the `PATH`, so you either\nhave to change the `PATH` yourself or set the full `PATH` to pandoc in\n`PYPANDOC_PANDOC`. See the next section for more information.\n\n### Specifying the location of pandoc binaries\n\nYou can point to a specific pandoc version by setting the environment variable\n`PYPANDOC_PANDOC` to the full `PATH` to the pandoc binary\n(`PYPANDOC_PANDOC=/home/x/whatever/pandoc` or `PYPANDOC_PANDOC=c:\\pandoc\\pandoc.exe`).\nIf this environment variable is set, this is the only place where pandoc is searched for.\n\nIn certain cases, e.g. pandoc is installed but a web server with its own user\ncannot find the binaries, it is useful to specify the location at runtime:\n\n```python\nimport os\nos.environ.setdefault(\'PYPANDOC_PANDOC\', \'/home/x/whatever/pandoc\')\n```\n\n## Usage\n\nThere are two basic ways to use pypandoc: with input files or with input\nstrings.\n\n\n```python\nimport pypandoc\n\n# With an input file: it will infer the input format from the filename\noutput = pypandoc.convert_file(\'somefile.md\', \'rst\')\n\n# ...but you can overwrite the format via the `format` argument:\noutput = pypandoc.convert_file(\'somefile.txt\', \'rst\', format=\'md\')\n\n# alternatively you could just pass some string. In this case you need to\n# define the input format:\noutput = pypandoc.convert_text(\'# some title\', \'rst\', format=\'md\')\n# output == \'some title\\r\\n==========\\r\\n\\r\\n\'\n```\n\n`convert_text` expects this string to be unicode or utf-8 encoded bytes. `convert_*` will always\nreturn a unicode string.\n\nIt\'s also possible to directly let pandoc write the output to a file. This is the only way to\nconvert to some output formats (e.g. odt, docx, epub, epub3, pdf). In that case `convert_*()` will\nreturn an empty string.\n\n```python\nimport pypandoc\n\noutput = pypandoc.convert_file(\'somefile.md\', \'docx\', outputfile="somefile.docx")\nassert output == ""\n```\n\nIn addition to `format`, it is possible to pass `extra_args`.\nThat makes it possible to access various pandoc options easily.\n\n```python\noutput = pypandoc.convert_text(\n    \'<h1>Primary Heading</h1>\',\n    \'md\', format=\'html\',\n    extra_args=[\'--atx-headers\'])\n# output == \'# Primary Heading\\r\\n\'\noutput = pypandoc.convert(\n    \'# Primary Heading\',\n    \'html\', format=\'md\',\n    extra_args=[\'--base-header-level=2\'])\n# output == \'<h2 id="primary-heading">Primary Heading</h2>\\r\\n\'\n```\n\npypandoc now supports easy addition of\n[pandoc filters](https://pandoc.org/scripting.html).\n\n```python\nfilters = [\'pandoc-citeproc\']\npdoc_args = [\'--mathjax\',\n             \'--smart\']\noutput = pypandoc.convert_file(filename,\n                               to=\'html5\',\n                               format=\'md\',\n                               extra_args=pdoc_args,\n                               filters=filters)\n```\n\nPlease pass any filters in as a list and not as a string.\n\nPlease refer to `pandoc -h` and the\n[official documentation](https://pandoc.org/MANUAL.html) for further details.\n\n> Note: the old way of using `convert(input, output)` is deprecated as in some cases it wasn\'t\npossible to determine whether the input should be used as a filename or as text.\n\n## Dealing with Formatting Arguments\n\nPandoc supports custom formatting though `-V` parameter. In order to use it through\npypandoc, use code such as this:\n\n```python\noutput = pypandoc.convert_file(\'demo.md\', \'pdf\', outputfile=\'demo.pdf\',\n  extra_args=[\'-V\', \'geometry:margin=1.5cm\'])\n```\n\n> Note: it\'s important to separate `-V` and its argument within a list like that or else\nit won\'t work. This gotcha has to do with the way\n[`subprocess.Popen`](https://docs.python.org/2/library/subprocess.html#subprocess.Popen) works.\n\n## Getting Pandoc Version\n\nAs it can be useful sometimes to check what pandoc version is available at your system or which\nparticular pandoc binary is used by pypandoc. For that, pypandoc provides the following\nutility functions. Example:\n\n```\nprint(pypandoc.get_pandoc_version())\nprint(pypandoc.get_pandoc_path())\nprint(pypandoc.get_pandoc_formats())\n```\n\n## Related\n\n* [pydocverter](https://github.com/msabramo/pydocverter) is a client for a service called\n[Docverter](https://www.docverter.com), which offers pandoc as a service (plus some extra goodies).\n* See [pyandoc](https://pypi.python.org/pypi/pyandoc/) for an alternative implementation of a pandoc\nwrapper from Kenneth Reitz. This one hasn\'t been active in a while though.\n* See [panflute](https://github.com/sergiocorreia/panflute) which provides `convert_text` similar to pypandoc\'s. Its focus is on writing and running pandoc filters though.\n\n## Contributing\n\nContributions are welcome. When opening a PR, please keep the following guidelines in mind:\n\n1. Before implementing, please open an issue for discussion.\n2. Make sure you have tests for the new logic.\n3. Make sure your code passes `flake8 pypandoc/*.py tests.py`\n4. Add yourself to contributors at `README.md` unless you are already there. In that case tweak your contributions.\n\nNote that for citeproc tests to pass you\'ll need to have [pandoc-citeproc](https://github.com/jgm/pandoc-citeproc) installed. If you installed a prebuilt wheel or conda package, it is already included.\n\n## Contributors\n\n* [Nicklas Tegner](https://github.com/nicklastegner) - New maintainer as of 1. Juli 2021\n* [Valentin Haenel](https://github.com/esc) - String conversion fix\n* [Daniel Sanchez](https://github.com/ErunamoJAZZ) - Automatic parsing of input/output formats\n* [Thomas G.](https://github.com/coldfix) - Python 3 support\n* [Ben Jao Ming](https://github.com/benjaoming) - Fail gracefully if pandoc is missing\n* [Ross Crawford-d\'Heureuse](https://github.com/rosscdh) - Encode input in UTF-8 and add Django\n  example\n* [Michael Chow](https://github.com/machow) - Decode output in UTF-8\n* [Janusz Skonieczny](https://github.com/wooyek) - Support Windows newlines and allow encoding to\n  be specified.\n* [gabeos](https://github.com/gabeos) - Fix help parsing\n* [Marc Abramowitz](https://github.com/msabramo) - Make `setup.py` fail hard if pandoc is\n  missing, Travis, Dockerfile, PyPI badge, Tox, PEP-8, improved documentation\n* [Daniel L.](https://github.com/mcktrtl) - Add `extra_args` example to README\n* [Amy Guy](https://github.com/rhiaro) - Exception handling for unicode errors\n* [Florian Eßer](https://github.com/flesser) - Allow Markdown extensions in output format\n* [Philipp Wendler](https://github.com/PhilippWendler) - Allow Markdown extensions in input format\n* [Jan Schulz](https://github.com/JanSchulz) - Handling output to a file, Travis to work on newer version of pandoc, return code checking, get_pandoc_version. Helped to fix the Travis build, new `convert_*` API\n* [Aaron Gonzales](https://github.com/xysmas) - Added better filter handling\n* [David Lukes](https://github.com/dlukes) - Enabled input from non-plain-text files and made sure tests clean up template files correctly if they fail\n* [valholl](https://github.com/valholl) - Set up licensing information correctly and include examples to distribution version\n* [Cyrille Rossant](https://github.com/rossant) - Fixed bug by trimming out stars in the list of pandoc formats. Helped to fix the Travis build.\n* [Paul Osborne](https://github.com/posborne) - Don\'t require pandoc to install pypandoc.\n* [Felix Yan](https://github.com/felixonmars) - Added installation instructions for Arch Linux.\n* [Kolen Cheung](https://github.com/ickc) - Implement `_get_pandoc_urls` for installing arbitrary version as well as the latest version of pandoc. Minor: README, Travis, setup.py.\n* [Rebecca Heineman](https://github.com/burgerbecky) - Added scanning code for finding pandoc in Windows\n* [Andrew Barraford](https://github.com/abarrafo) - Download destination.\n \n## License\n\nPypandoc is available under MIT license. See LICENSE for more details. Pandoc itself is [available under the GPL2 license](https://github.com/jgm/pandoc/blob/master/COPYING.md).\n',
    'author': 'NicklasTegner',
    'author_email': 'NicklasMCHD@live.dk',
    'maintainer': None,
    'maintainer_email': None,
    'url': 'https://github.com/NicklasTegner/pypandoc',
    'packages': packages,
    'package_data': package_data,
    'python_requires': '>=3,<4',
}


setup(**setup_kwargs)
