Convert the parsed MediaWiki wikicode (using mwparserfromhell) to HTML.
Project description
mwcomposerfromhell is a Python package that provides an easy-to-use method to convert MediaWiki Wikicode to HTML via mwparserfromhell. It supports Python 3.
Usage
Normal usage is rather straightforward to convert from a str of Wikicode to a str of HTML. It involves two steps:
Parse the Wikicode to an abstract syntax tree using mwparserfromhell.
Convert the AST to HTML.
>>> import mwparserfromhell
>>> import mwcomposerfromhell
>>> wikicode = mwparserfromhell.parse(text) # Step 1
>>> html = mwcomposerfromhell.compose(wikicode) # Step 2
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for mwcomposerfromhell-0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 204ce34c22a03c5f5d91212c730cbf0b461a8b6c2d9f0c812b89ada6b5b42800 |
|
MD5 | 14e946a40ce250a7114b3e61a751968e |
|
BLAKE2b-256 | 8d535a2c4e31c6ca946d201ba5ee55f263b9d1ab3b80886841b3afe065a56fce |