pypandoc provides a thin wrapper for pandoc, a universal document converter. Use it as follows:
import pypandoc
output = pypandoc.convert('somefile.md', 'rst')
# alternatively you could just pass some string to it and define its format
output = pypandoc.convert('#some title', 'rst', format='md')
The code infers pandoc --from format automatically based on given file extension unless one is provided explicitly. extra_args parameter makes it possible to access various pandoc options. Please refer to pandoc -h and the official documentation for further details.
See also pyandoc.
Contributors
Valentin Haenel - String conversion fix
Daniel Sanchez - Automatic parsing of input/output formats
Thomas G. - Python 3 support
License
pypandoc is available under MIT license. See LICENSE for more details.
Metadata
Release files for pypandoc 0.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pypandoc-0.7.0.tar.gz | 3.0 kB | Details |
Release files / pypandoc-0.7.0.tar.gz
| Download URL | pypandoc-0.7.0.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a2ea07073e0857b2e8675f2b0809c0ac225f0f9209ed8e1e42aef5cd291be61d
|
|
BLAKE2b-256 checksum How to use checksums |
c20829b56928230cff95bd1984aab4afb63a8d334cb903d1c6a8222e39fd9b2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |