A wrapper around various text markups
Project description
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
Release history Release notifications | RSS feed
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.0.tar.gz
(14.8 kB
view details)
File details
Details for the file Markups-1.0.0.tar.gz
.
File metadata
- Download URL: Markups-1.0.0.tar.gz
- Upload date:
- Size: 14.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d618b2af5c37fa0e4ae2e0798a87505d1e94f9eb78d0db6b893df1f91c37ec2 |
|
MD5 | 4735d8a5da2f3532785350c560ba2b4b |
|
BLAKE2b-256 | 338d9321af6a4093fb872d350fcbb5280036b7042f9f9c686e1b888f6a27ed18 |