Name | pandoc JSON |
Version |
2.4
JSON |
| download |
home_page | None |
Summary | Pandoc Documents for Python |
upload_time | 2024-08-07 14:33:58 |
maintainer | None |
docs_url | None |
author | Sébastien Boisgérault |
requires_python | None |
license | MIT License |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
Pandoc (Python Library)
================================================================================

[](https://pypi.python.org/pypi/pandoc)
[](https://boisgera.github.io/pandoc)
[](https://github.com/boisgera/pandoc/discussions)
[](https://pepy.tech/project/pandoc)
[](https://github.com/boisgera/pandoc/stargazers)
[](https://github.com/boisgera/pandoc/actions/workflows/linux.yml)
[](https://github.com/boisgera/pandoc/actions/workflows/macos.yml)
[](https://github.com/boisgera/pandoc/actions/workflows/windows.yml)
🚀 Getting started
--------------------------------------------------------------------------------
Install [Pandoc] first, for example with [conda]:
$ conda install -c conda-forge pandoc
Then, install the Pandoc Python Library with pip:
$ pip install --upgrade pandoc
🌌 Overview
--------------------------------------------------------------------------------
[Pandoc] is the awesome open-source command-line tool that converts documents
from one format to another. The project was initiated by [John MacFarlane];
under the hood, it's a [Haskell] library.
The Pandoc Python Library brings [Pandoc]'s document model 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": null,
"name": "pandoc",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "S\u00e9bastien Boisg\u00e9rault",
"author_email": "Sebastien.Boisgerault@minesparis.psl.eu",
"download_url": "https://files.pythonhosted.org/packages/10/9a/e3186e760c57ee5f1c27ea5cea577a0ff9abfca51eefcb4d9a4cd39aff2e/pandoc-2.4.tar.gz",
"platform": null,
"description": "\nPandoc (Python Library)\n================================================================================\n\n\n[](https://pypi.python.org/pypi/pandoc)\n[](https://boisgera.github.io/pandoc)\n[](https://github.com/boisgera/pandoc/discussions)\n[](https://pepy.tech/project/pandoc)\n[](https://github.com/boisgera/pandoc/stargazers)\n\n[](https://github.com/boisgera/pandoc/actions/workflows/linux.yml)\n[](https://github.com/boisgera/pandoc/actions/workflows/macos.yml)\n[](https://github.com/boisgera/pandoc/actions/workflows/windows.yml)\n\n\n\ud83d\ude80 Getting started\n--------------------------------------------------------------------------------\n\nInstall [Pandoc] first, for example with [conda]:\n\n $ conda install -c conda-forge pandoc\n\nThen, install the Pandoc Python Library with pip:\n\n $ pip install --upgrade pandoc\n\n\n\ud83c\udf0c Overview \n--------------------------------------------------------------------------------\n\n[Pandoc] is the awesome open-source command-line tool that converts documents \nfrom one format to another. The project was initiated by [John MacFarlane]; \nunder the hood, it's a [Haskell] library.\n\nThe Pandoc Python Library brings [Pandoc]'s document model 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[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\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "Pandoc Documents for Python",
"version": "2.4",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "109ae3186e760c57ee5f1c27ea5cea577a0ff9abfca51eefcb4d9a4cd39aff2e",
"md5": "d2e9236dead8427ea9a1653ba8123b37",
"sha256": "ecd1f8cbb7f4180c6b5db4a17a7c1a74df519995f5f186ef81ce72a9cbd0dd9a"
},
"downloads": -1,
"filename": "pandoc-2.4.tar.gz",
"has_sig": false,
"md5_digest": "d2e9236dead8427ea9a1653ba8123b37",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 34635,
"upload_time": "2024-08-07T14:33:58",
"upload_time_iso_8601": "2024-08-07T14:33:58.016685Z",
"url": "https://files.pythonhosted.org/packages/10/9a/e3186e760c57ee5f1c27ea5cea577a0ff9abfca51eefcb4d9a4cd39aff2e/pandoc-2.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-07 14:33:58",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "pandoc"
}