pandoc


Namepandoc JSON
Version 2.4 PyPI version JSON
download
home_pageNone
SummaryPandoc Documents for Python
upload_time2024-08-07 14:33:58
maintainerNone
docs_urlNone
authorSébastien Boisgérault
requires_pythonNone
licenseMIT 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
--------------------------------------------------------------------------------

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![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\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"
}
        
Elapsed time: 0.30859s