mwcomposerfromhell


Namemwcomposerfromhell JSON
Version 0.5 PyPI version JSON
download
home_pagehttps://github.com/clokep/mwcomposerfromhell
SummaryConvert the parsed MediaWiki wikicode (using mwparserfromhell) to HTML.
upload_time2022-12-23 20:08:20
maintainer
docs_urlNone
authorPatrick Cloke
requires_python>=3.7
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            mwcomposerfromhell
##################

.. image:: https://travis-ci.org/clokep/mwcomposerfromhell.svg?branch=master
    :target: https://travis-ci.org/clokep/mwcomposerfromhell

**mwcomposerfromhell** is a Python package that provides an easy-to-use method
to convert MediaWiki `Wikicode`_ to HTML via `mwparserfromhell`_. It supports
Python 3.

.. _Wikicode: https://en.wikipedia.org/wiki/Help:Wikitext
.. _mwparserfromhell: https://mwparserfromhell.readthedocs.io

Usage
-----

Normal usage is rather straightforward to convert from a ``str`` of Wikicode to
a ``str`` of HTML. It involves two steps:

1. Parse the Wikicode to an abstract syntax tree using ``mwparserfromhell``.
2. Convert the AST to HTML.

.. code-block:: python

    >>> import mwparserfromhell
    >>> import mwcomposerfromhell
    >>> wikicode = mwparserfromhell.parse(text)  # Step 1
    >>> html = mwcomposerfromhell.compose(wikicode)  # Step 2

You can also use it from the command line if you already have your wikicode in
a file. The convert HTML is output on standard out.

.. code-block:: sh

    python -m mwcomposerfromhell path/to/my/wikicode

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/clokep/mwcomposerfromhell",
    "name": "mwcomposerfromhell",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "",
    "author": "Patrick Cloke",
    "author_email": "clokep@patrick.cloke.us",
    "download_url": "https://files.pythonhosted.org/packages/8b/10/8d93025e303b36dfacea9f88a9dc45232d039ce914dbe9580458eff01158/mwcomposerfromhell-0.5.tar.gz",
    "platform": null,
    "description": "mwcomposerfromhell\n##################\n\n.. image:: https://travis-ci.org/clokep/mwcomposerfromhell.svg?branch=master\n    :target: https://travis-ci.org/clokep/mwcomposerfromhell\n\n**mwcomposerfromhell** is a Python package that provides an easy-to-use method\nto convert MediaWiki `Wikicode`_ to HTML via `mwparserfromhell`_. It supports\nPython 3.\n\n.. _Wikicode: https://en.wikipedia.org/wiki/Help:Wikitext\n.. _mwparserfromhell: https://mwparserfromhell.readthedocs.io\n\nUsage\n-----\n\nNormal usage is rather straightforward to convert from a ``str`` of Wikicode to\na ``str`` of HTML. It involves two steps:\n\n1. Parse the Wikicode to an abstract syntax tree using ``mwparserfromhell``.\n2. Convert the AST to HTML.\n\n.. code-block:: python\n\n    >>> import mwparserfromhell\n    >>> import mwcomposerfromhell\n    >>> wikicode = mwparserfromhell.parse(text)  # Step 1\n    >>> html = mwcomposerfromhell.compose(wikicode)  # Step 2\n\nYou can also use it from the command line if you already have your wikicode in\na file. The convert HTML is output on standard out.\n\n.. code-block:: sh\n\n    python -m mwcomposerfromhell path/to/my/wikicode\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Convert the parsed MediaWiki wikicode (using mwparserfromhell) to HTML.",
    "version": "0.5",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "73bb109472275055923cd2f223223111",
                "sha256": "ed4125b64d82ea725085250482867498665d8aa193f471fe70c76ac9f700a278"
            },
            "downloads": -1,
            "filename": "mwcomposerfromhell-0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "73bb109472275055923cd2f223223111",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 19548,
            "upload_time": "2022-12-23T20:08:18",
            "upload_time_iso_8601": "2022-12-23T20:08:18.134770Z",
            "url": "https://files.pythonhosted.org/packages/bf/0e/be4d4072bb774b8b980e23f152eb12bd84c2f5accd7ac747be2455bdd282/mwcomposerfromhell-0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "5f224fa4063bf077deb89d6e3b650409",
                "sha256": "c73c6935dca08af729c6405058611014642090a424826f14ea20f32683282b66"
            },
            "downloads": -1,
            "filename": "mwcomposerfromhell-0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "5f224fa4063bf077deb89d6e3b650409",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 21331,
            "upload_time": "2022-12-23T20:08:20",
            "upload_time_iso_8601": "2022-12-23T20:08:20.135116Z",
            "url": "https://files.pythonhosted.org/packages/8b/10/8d93025e303b36dfacea9f88a9dc45232d039ce914dbe9580458eff01158/mwcomposerfromhell-0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-23 20:08:20",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "clokep",
    "github_project": "mwcomposerfromhell",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "mwcomposerfromhell"
}
        
Elapsed time: 0.06638s