Skip to main content

A Python binding for Upskirt.

Project description

A Python binding for Upskirt.

Documentation can be found at: http://misaka.61924.nl/

Installation

With pip:

pip install misaka

Or manually:

python setup.py install

Usage

Without any extensions or flags enabled:

import misaka

misaka.html('Hello, world!')

With extensions and render flags:

import misaka as m

m.html(
    'Hello, world!',
    m.EXT_AUTOLINK | m.EXT_TABLES,
    m.HTML_EXPAND_TABS
)

In combination with functools.partial:

import functools
import misaka as m

markdown = functools.partial(
    m.html,
    extensions=m.EXT_AUTOLINK | m.EXT_TABLES,
    render_flags=m.HTML_EXPAND_TABS
)
markdown('Awesome!')

Or generate a table of contents:

misaka.toc('''
# Header one

Some text here.

## Header two

Some more text
''')

Extensions & render flags

Extensions:

EXT_AUTOLINK
EXT_LAX_HTML_BLOCKS
EXT_TABLES
EXT_NO_INTRA_EMPHASIS
EXT_STRIKETHROUGH
EXT_FENCED_CODE
EXT_SPACE_HEADERS

Render flags:

HTML_GITHUB_BLOCKCODE
HTML_SKIP_HTML
HTML_SKIP_STYLE
HTML_HARD_WRAP
HTML_TOC
HTML_SKIP_LINKS
HTML_SAFELINK
HTML_SKIP_IMAGES
HTML_EXPAND_TABS
HTML_USE_XHTML
HTML_SMARTYPANTS

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

misaka-0.3.3.tar.gz (27.7 kB view details)

Uploaded Source

File details

Details for the file misaka-0.3.3.tar.gz.

File metadata

  • Download URL: misaka-0.3.3.tar.gz
  • Upload date:
  • Size: 27.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for misaka-0.3.3.tar.gz
Algorithm Hash digest
SHA256 9e7af3b42fda7f166b6f5309c0a5d80fc58b8d8caa1dd99c993534a0a429e985
MD5 b0197bc1148cc514f77b1a9a55118554
BLAKE2b-256 d5fbbc70784db653650cd7acf7e818efc3b795857ae36c31234f0231bcd5d044

See more details on using hashes here.

Provenance

Supported by

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