Name | pandoc JSON |
Version |
2.3
JSON |
| download |
home_page | |
Summary | Pandoc Documents for Python |
upload_time | 2022-11-23 19:36:17 |
maintainer | |
docs_url | None |
author | Sébastien Boisgérault |
requires_python | |
license | MIT License |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
Pandoc – 🐍 Python Library
================================================================================
![Python](https://img.shields.io/pypi/pyversions/pandoc.svg)
[![PyPI version](https://img.shields.io/pypi/v/pandoc.svg)](https://pypi.python.org/pypi/pandoc)
[![Mkdocs](https://img.shields.io/badge/doc-mkdocs-845ed7.svg)](https://boisgera.github.io/pandoc)
[![GitHub discussions](https://img.shields.io/badge/discuss-online-845ef7)](https://github.com/boisgera/pandoc/discussions)
[![Downloads](https://pepy.tech/badge/pandoc)](https://pepy.tech/project/pandoc)
[![GitHub stars](https://img.shields.io/github/stars/boisgera/pandoc?style=flat)](https://github.com/boisgera/pandoc/stargazers)
[![linux](https://github.com/boisgera/pandoc/actions/workflows/linux.yml/badge.svg)](https://github.com/boisgera/pandoc/actions/workflows/linux.yml)
[![macos](https://github.com/boisgera/pandoc/actions/workflows/macos.yml/badge.svg)](https://github.com/boisgera/pandoc/actions/workflows/macos.yml)
[![windows](https://github.com/boisgera/pandoc/actions/workflows/windows.yml/badge.svg)](https://github.com/boisgera/pandoc/actions/workflows/windows.yml)
🚀 Getting started
--------------------------------------------------------------------------------
[Pandoc] – the general markup converter (and Haskell library) written by
[John MacFarlane] – needs to be available.
You may follow the official [installation instructions][pandoc-install]
or use [conda]:
$ conda install -c conda-forge pandoc
Then, install the latest stable version of the pandoc Python library with pip:
$ pip install --upgrade pandoc
🌌 Overview
--------------------------------------------------------------------------------
This project brings [Pandoc]'s data model for markdown documents to Python:
$ echo "Hello world!" | python -m pandoc read
Pandoc(Meta({}), [Para([Str('Hello'), Space(), Str('world!')])])
It can be used to analyze, create and transform documents, in Python :
>>> import pandoc
>>> text = "Hello world!"
>>> doc = pandoc.read(text)
>>> doc
Pandoc(Meta({}), [Para([Str('Hello'), Space(), Str('world!')])])
>>> paragraph = doc[1][0]
>>> paragraph
Para([Str('Hello'), Space(), Str('world!')])
>>> from pandoc.types import Str
>>> paragraph[0][2] = Str('Python!')
>>> text = pandoc.write(doc)
>>> print(text)
Hello Python!
For more information, refer to the [📖 documentation][doc].
[Pandoc]: https://pandoc.org/
[John MacFarlane]: https://johnmacfarlane.net/
[pandoc-install]: https://pandoc.org/installing.html
[conda]: https://docs.conda.io
[Haskell]: https://www.haskell.org/
[Python]: https://www.python.org/
[TPD]: https://hackage.haskell.org/package/pandoc-types-1.20/docs/Text-Pandoc-Definition.html
[doc]: https://boisgera.github.io/pandoc
Raw data
{
"_id": null,
"home_page": "",
"name": "pandoc",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "S\u00e9bastien Boisg\u00e9rault",
"author_email": "Sebastien.Boisgerault@minesparis.psl.eu",
"download_url": "https://files.pythonhosted.org/packages/c5/2f/19a65b7cb6b8d1000c6934a904f7b1f52c33b63115d6dce231738b0712f3/pandoc-2.3.tar.gz",
"platform": null,
"description": "Pandoc \u2013 \ud83d\udc0d Python Library\n================================================================================\n\n![Python](https://img.shields.io/pypi/pyversions/pandoc.svg)\n[![PyPI version](https://img.shields.io/pypi/v/pandoc.svg)](https://pypi.python.org/pypi/pandoc)\n[![Mkdocs](https://img.shields.io/badge/doc-mkdocs-845ed7.svg)](https://boisgera.github.io/pandoc)\n[![GitHub discussions](https://img.shields.io/badge/discuss-online-845ef7)](https://github.com/boisgera/pandoc/discussions)\n[![Downloads](https://pepy.tech/badge/pandoc)](https://pepy.tech/project/pandoc)\n[![GitHub stars](https://img.shields.io/github/stars/boisgera/pandoc?style=flat)](https://github.com/boisgera/pandoc/stargazers)\n\n[![linux](https://github.com/boisgera/pandoc/actions/workflows/linux.yml/badge.svg)](https://github.com/boisgera/pandoc/actions/workflows/linux.yml)\n[![macos](https://github.com/boisgera/pandoc/actions/workflows/macos.yml/badge.svg)](https://github.com/boisgera/pandoc/actions/workflows/macos.yml)\n[![windows](https://github.com/boisgera/pandoc/actions/workflows/windows.yml/badge.svg)](https://github.com/boisgera/pandoc/actions/workflows/windows.yml)\n\n\n\ud83d\ude80 Getting started\n--------------------------------------------------------------------------------\n\n[Pandoc] \u2013 the general markup converter (and Haskell library) written by \n[John MacFarlane] \u2013 needs to be available. \nYou may follow the official [installation instructions][pandoc-install] \nor use [conda]:\n\n $ conda install -c conda-forge pandoc\n\nThen, install the latest stable version of the pandoc Python library with pip:\n\n $ pip install --upgrade pandoc\n\n\n\ud83c\udf0c Overview \n--------------------------------------------------------------------------------\n\nThis project brings [Pandoc]'s data model for markdown documents to Python:\n\n $ echo \"Hello world!\" | python -m pandoc read \n Pandoc(Meta({}), [Para([Str('Hello'), Space(), Str('world!')])])\n\nIt can be used to analyze, create and transform documents, in Python :\n\n >>> import pandoc\n >>> text = \"Hello world!\"\n >>> doc = pandoc.read(text)\n >>> doc\n Pandoc(Meta({}), [Para([Str('Hello'), Space(), Str('world!')])])\n\n >>> paragraph = doc[1][0]\n >>> paragraph\n Para([Str('Hello'), Space(), Str('world!')])\n >>> from pandoc.types import Str\n >>> paragraph[0][2] = Str('Python!')\n >>> text = pandoc.write(doc)\n >>> print(text)\n Hello Python!\n\nFor more information, refer to the [\ud83d\udcd6 documentation][doc].\n\n\n[Pandoc]: https://pandoc.org/\n[John MacFarlane]: https://johnmacfarlane.net/\n[pandoc-install]: https://pandoc.org/installing.html\n[conda]: https://docs.conda.io\n[Haskell]: https://www.haskell.org/\n[Python]: https://www.python.org/\n[TPD]: https://hackage.haskell.org/package/pandoc-types-1.20/docs/Text-Pandoc-Definition.html\n[doc]: https://boisgera.github.io/pandoc",
"bugtrack_url": null,
"license": "MIT License",
"summary": "Pandoc Documents for Python",
"version": "2.3",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c52f19a65b7cb6b8d1000c6934a904f7b1f52c33b63115d6dce231738b0712f3",
"md5": "df89df682ef745b8eb1ff4c1008c3f65",
"sha256": "e772c2c6d871146894579828dbaf1efd538eb64fc7e71d4a6b3a11a18baef90d"
},
"downloads": -1,
"filename": "pandoc-2.3.tar.gz",
"has_sig": false,
"md5_digest": "df89df682ef745b8eb1ff4c1008c3f65",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 33155,
"upload_time": "2022-11-23T19:36:17",
"upload_time_iso_8601": "2022-11-23T19:36:17.335155Z",
"url": "https://files.pythonhosted.org/packages/c5/2f/19a65b7cb6b8d1000c6934a904f7b1f52c33b63115d6dce231738b0712f3/pandoc-2.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-11-23 19:36:17",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "pandoc"
}