Skip to main content

A wrapper around various text markups

Project description

This module provides a wrapper around the various text markup languages, such as Markdown and reStructuredText (these two are supported by default).

Usage example:

>>> markup = markups.get_markup_for_file_name("myfile.rst")
>>> markup.name
'reStructuredText'
>>> markup.attributes[markups.SYNTAX_DOCUMENTATION]
'http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html'
>>> text = "Hello, world!\n=============\n\nThis 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'

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-0.2.3.tar.gz (8.8 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for Markups-0.2.3.tar.gz
Algorithm Hash digest
SHA256 bef1a5881abf40caf556d25a099c3eec8a6f2b154c1c597dbc6e5a8ae1fcd507
MD5 4808f5f6d76aa140bd39760418ce6c7b
BLAKE2b-256 63e852231779b8b202bf90573b9c23af247a147b1beabe0ed89c741473175c9f

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