/ProMD

ProMD is a small library that can generate Markdown based on code.

Primary LanguagePython

PMD

ProMD (Programmatic Mardown) is a small library which help you generating Markdown from code.
Remembering all Markdown features and how to implement them is slow, and sometimes we make errors

Install

# Using PIP:
pip install ProMD

# Using GIT plus PIP
pip install git+https://github.com/ZSendokame/ProMD.git

Use

Using PMD is easy!

import promd

md = promd.Markdown('file.md')  # File used to saved the Markdown.

md.header('Welcome to ProMD', level=1)  # A header and it's level.
md.text('Hi, this is a string.')
# Inside .text(), you can use: .bold(), .cursive() and .code().

md.ordered_list(['You can make Ordered lists.', 'Or an unordered one'])
md.unordered_list(['Like this!', 'they work the same way so...'])

md.table([
    promd.Array('First Column', ['First row, first', 'Second row, first']),
    promd.Array('Seconds Column', ['First row, second', 'Second row, second'])
])
# Create a common table, receives a list of .Array() classes, that contain the
# information to create the table.

md.save()
# Save generated markdown to the file.

# Or just use:
md.markdown