Skip to main content

markdown generator

Project description

Install

$ [sudo] pip install mdown

Functions

function description
mdown.code(code, language=None) return string with markdown code block
mdown.header(title, lvl) return string with markdown header
mdown.image(url, link='', title='', alt='') return string with markdown image
mdown.table(headers, matrix) return string with markdown table (one-line cells only)

Examples

header

>>> import mdown
>>> mdown.header("title", 6)
'###### Title'

code

>>> mdown.code("$ [sudo] pip install readme_md", "bash")
# look Install section :)

image

>>> mdown.image("https://domain.com/image.png", title="title text", alt="alt text")
'![alt text](https://domain.com/image.png "title text")'

table

>>> mdown.table(("header1","header2"),(("cell11","cell12"), ("cell21","cell22")))
'header1|header2
-|-
cell11|cell12
cell21|cell22'

readme-md - README.md generator

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
mdown-2018.11.20-py2.py3-none-any.whl (2.7 kB) Copy SHA256 hash SHA256 Wheel py2.py3
mdown-2018.11.20.tar.gz (1.9 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page