Metadata-Version: 2.1
Name: mwcomposerfromhell
Version: 0.3
Summary: Convert the parsed MediaWiki wikicode (using mwparserfromhell) to HTML.
Home-page: https://github.com/clokep/mwcomposerfromhell
Author: Patrick Cloke
Author-email: clokep@patrick.cloke.us
License: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Internet
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: License :: OSI Approved :: ISC License (ISCL)
Requires-Dist: mwparserfromhell (>=0.5)
Provides-Extra: dev
Requires-Dist: pytest (==4.4.1) ; extra == 'dev'
Requires-Dist: pytest-cov (==2.7.1) ; extra == 'dev'
Requires-Dist: flake8 (==3.7.7) ; extra == 'dev'
Requires-Dist: flake8-builtins (==1.4.1) ; extra == 'dev'
Requires-Dist: flake8-import-order (==0.18.1) ; extra == 'dev'
Requires-Dist: mypy ; extra == 'dev'

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


