skip to navigation
skip to content

Markups 1.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.name
'reStructuredText'
>>> markup.attributes[markups.common.SYNTAX_DOCUMENTATION]
'http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html'
>>> text = """
... Hello, world!
... =============
...
... This is an example **reStructuredText** document.
... """
>>> markup.get_document_title(text)
'Hello, world!'
>>> markup.get_document_body(text)
'<p>This is an example <strong>reStructuredText</strong> document.</p>\n'

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

 
File Type Py Version Uploaded on Size
Markups-1.0.1.tar.gz (md5, pgp) Source 2015-12-22 14KB
  • Downloads (All Versions):
  • 12 downloads in the last day
  • 320 downloads in the last week
  • 1712 downloads in the last month