A visitor for Mau that converts the AST into HTML
Project description
Mau HTML Visitor
This is a plugin for the Mau markup language. The plugin provides the conversion from Mau source to HTML.
You can install this plugin with
pip install mau-html-visitor
and Mau will automatically be able to load it. To use the visitor you need to load it and to pass it to the class Mau when you instantiate it
from mau import Mau, load_visitors
from mau.message import LogMessageHandler
visitor_classes = load_visitors()
visitors = {i.format_code: i for i in visitor_classes.values()}
visitor_class = visitors["html"]
message_handler = LogMessageHandler()
mau = Mau(message_handler)
result = mau.process(visitor_class, text, "source.mau")
The default extension for templates is .html. The plugin uses Pygments to provide source code highlighting.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mau_html_visitor-3.0.0.tar.gz.
File metadata
- Download URL: mau_html_visitor-3.0.0.tar.gz
- Upload date:
- Size: 14.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44268de692d04fa57bf6da2d1e6ad44c0edd29b0882a00bc3c991f9c082e471b
|
|
| MD5 |
3f821d404e0adf50a46e2aa8f4bd303f
|
|
| BLAKE2b-256 |
2833596e51425cc4f988ced0204578777a002f7c5d02319491121f793900b16b
|
File details
Details for the file mau_html_visitor-3.0.0-py3-none-any.whl.
File metadata
- Download URL: mau_html_visitor-3.0.0-py3-none-any.whl
- Upload date:
- Size: 14.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d1b5c6c1cf9a04a5cab05530b5e0d7d335a18ef65484ef52ec906047cff3890
|
|
| MD5 |
3f6e78beb6d9c737b53b6b7b37167515
|
|
| BLAKE2b-256 |
dac709e68188f250f9d07200d6f0520b65b7159480fc7a649af54f60602921bd
|