pyandoc is an unmaintained Python wrapper for Pandoc, the universal document converter. It allows for converting text document formats by interacting with a Document object's attributes. The last release was version 0.2.0 in February 2016, and the project is no longer actively developed. Users seeking a current Pandoc wrapper for Python should consider 'pypandoc' instead.
pip install pyandocVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize a `pandoc.Document` object, assign content in Markdown, and then convert it to other formats like reStructuredText and HTML by accessing the respective properties. Ensure Pandoc is installed separately on your system for `pyandoc` to function.
Migrate to an actively maintained Pandoc wrapper like 'pypandoc'. This library provides similar functionality and is regularly updated.
Install Pandoc separately via your system's package manager (e.g., `sudo apt-get install pandoc` on Debian/Ubuntu, `brew install pandoc` on macOS) or by downloading an installer from the official Pandoc website. Verify installation by running `pandoc --version` in your terminal.
Avoid using pyandoc in Python 3.x projects. For Python 3.x, use 'pypandoc', which actively supports current Python versions and has dropped Python 2.x support.
Ensure the `pyandoc` package is correctly installed using `pip install pyandoc`. Then, use `import pandoc` as specified in the library's documentation.
Install the `pandoc` universal document converter directly on your operating system (e.g., via Homebrew on macOS, `apt` on Debian/Ubuntu, `choco` on Windows, or by downloading the installer from the official Pandoc website: `https://pandoc.org/installing.html`). Ensure the `pandoc` executable's location is included in your system's PATH.
Perform conversions by setting the source content to the appropriate input format attribute and reading the result from the desired output format attribute. For example: `doc = pandoc.Document(); doc.markdown = '# Hello'; html_output = doc.html`.