Skip to main content

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

mau_html_visitor-3.0.0.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mau_html_visitor-3.0.0-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

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

Hashes for mau_html_visitor-3.0.0.tar.gz
Algorithm Hash digest
SHA256 44268de692d04fa57bf6da2d1e6ad44c0edd29b0882a00bc3c991f9c082e471b
MD5 3f821d404e0adf50a46e2aa8f4bd303f
BLAKE2b-256 2833596e51425cc4f988ced0204578777a002f7c5d02319491121f793900b16b

See more details on using hashes here.

File details

Details for the file mau_html_visitor-3.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mau_html_visitor-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7d1b5c6c1cf9a04a5cab05530b5e0d7d335a18ef65484ef52ec906047cff3890
MD5 3f6e78beb6d9c737b53b6b7b37167515
BLAKE2b-256 dac709e68188f250f9d07200d6f0520b65b7159480fc7a649af54f60602921bd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page