Skip to main content

A wrapper around various text markups

Project description

Travis CI status

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.

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

Markups-1.0.1.tar.gz (14.9 kB view details)

Uploaded Source

File details

Details for the file Markups-1.0.1.tar.gz.

File metadata

  • Download URL: Markups-1.0.1.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Markups-1.0.1.tar.gz
Algorithm Hash digest
SHA256 74464b7532aa355f6ed2767fd5cfb5eb5b484dd773b33bae4016a7fa9354b4ee
MD5 bdb52519cf4825ad25f681592ab691eb
BLAKE2b-256 daf8f251367f9a471819e9161f12a3c0f8ef67fa6570cb857a9cb291cabf9bf9

See more details on using hashes here.

Supported by

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