skip to navigation
skip to content

Markups 2.0.1

A wrapper around various text markups

Package Documentation

This module provides a wrapper around various text markup languages.

Available by default are Markdown, reStructuredText and Textile, but you can easily add your own markups.

Usage example:

>>> import markups
>>> markup = markups.get_markup_for_file_name("myfile.rst")
>>> markup.attributes[markups.common.SYNTAX_DOCUMENTATION]
>>> text = """
... Hello, world!
... =============
... This is an example **reStructuredText** document.
... """
>>> result = markup.convert(text)
>>> result.get_document_title()
'Hello, world!'
>>> print(result.get_document_body())  # doctest: +NORMALIZE_WHITESPACE
<div class="document" id="hello-world">
<h1 class="title">Hello, world!</h1>
<p>This is an example <strong>reStructuredText</strong> document.</p>

The release version can be downloaded from PyPI. The source code is hosted on GitHub.

The documentation is available online or can be generated from source by installing Sphinx and running:

python3 build_sphinx
File Type Py Version Uploaded on Size
Markups-2.0.1.tar.gz (md5, pgp) Source 2017-06-24 16KB