Skip to main content

Python wrapper for Pandoc - the universal document converter

Project description

Pyandoc is a simple Python wrapper for the excellent pandoc utility. It allows you to convert the format of text documents by interacting with a Document object’s attributes. Each supported format is available as a property, and can either read from or written to.

Requirements

  • Pandoc

Usage

Get setup.

import pandoc

Let’s start with a Markdown document:

doc = pandoc.Document()
doc.markdown = '''
# I am an H1 Tag

* bullet point
* more points
* point with [link](http://kennethreitz.com)!
'''

Now let’s convert that into a ReST document:

>>> print doc.rst

I am an H1 Tag
==============


-  bullet point
-  more points
-  point with `link <http://kennethreitz.com>`_!
Formats available:
  • asciidoc

  • beamer

  • commonmark

  • context

  • docbook

  • doc- x

  • dokuwiki

  • dzslides

  • epub

  • epub3

  • fb2

  • haddock

  • html

  • html5

  • icml

  • json (pandoc’s AST)

  • latex

  • man

  • markdown

  • markdown_github

  • markdown_mmd

  • markdown_phpextra

  • markdown_strict

  • mediawiki

  • native

  • odt

  • opendocument

  • opml

  • org

  • pdf

  • plain

  • revealjs

  • rst

  • rtf

  • s5,

  • slideous

  • slidy

  • texinfo

  • textile

Enjoy.

v0.0.2 (02-04-2016)

  • Automatically find pandoc executable.

  • Updated export formats.

v0.0.1 (01-02-2010)

  • Initial release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyandoc-0.2.0.tar.gz (4.3 kB view details)

Uploaded Source

File details

Details for the file pyandoc-0.2.0.tar.gz.

File metadata

  • Download URL: pyandoc-0.2.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyandoc-0.2.0.tar.gz
Algorithm Hash digest
SHA256 141a22d1cc0e17f1caa3fa85bdd0c674efdfc932d53a968e650a3ba578b8cc0e
MD5 94421c3b0929a14e1cd759ec06498631
BLAKE2b-256 418131db77364c1d18b28f345d246633d0c3b597ee8ac1cf60a46912c3f5a096

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page