markdownmaker
markdownmaker is an easy-to-use minimal library to generate a Markdown document with a Python API. Actually, this document you are reading right now was generated with markdownmaker for demonstration purposes (source). Currently it uses Github Flavored Markdown but more flavors might follow.
This library was developed to aid with generating a reference for Armory3D's logic nodes, thus its feature scope is rather small and the output might have some bugs when creating complex documents. If you encounter problems, please open an issue.
Installation
markdownmaker is installed via pip:
pip install markdownmaker
Usage (API)
Import the following:
from markdownmaker.document import Document
from markdownmaker.markdownmaker import *
Then, create a document:
doc = Document()
After you finished creating the document, doc.write() returns the Markdown source code.
Emphasis
doc.add(Paragraph(Italic("This text will be italic!")))
doc.add(Paragraph(Bold("This text will be bold!")))
doc.add(Paragraph(f"You can also combine {Bold(Italic('bold and italic text!'))}"))
This text will be italic!
This text will be bold!
You can also combine bold and italic text!
Headers
doc.add(Header("This is a header"))
with HeaderSubLevel(doc):
doc.add(Header("This is a sub-header"))
with HeaderSubLevel(doc):
doc.add(Header("This is a sub-sub-header"))
This is a header
This is a sub-header
This is a sub-sub-header
Lists
doc.add(OrderedList((
"Item 1",
"Item 2",
UnorderedList((
Bold("Sub-item A"),
Italic("Sub-item B"))),
"Item 3")))
- Item 1
- Item 2
- Sub-item A
- Sub-item B
- Item 3
Horizontal Rule
doc.add(HorizontalRule())
Links and Images
doc.add(Link(label='Go to top', url='#markdownmaker'))
doc.add(Image(url='https://gitlab.com/uploads/-/system/project/avatar/21351489/markdownmaker.png?width=40', alt_text='logo'))
Code
doc.add(CodeBlock("""import this
import __hello__""", language="python"))
doc.add(Paragraph(f"{InlineCode('Inline code')} is also supported!"))
import this
import __hello__
Inline code is also supported!
Quotes
doc.add(Quote(f"""Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Donec et quam at eros dignissim accumsan. Aenean quis sagittis dolor. Ut justo nisl,
lobortis nec elit id, dictum ullamcorper ipsum. Fusce eu ullamcorper eros, nec
feugiat lectus.
{Italic(Bold("Albert Einstein."))}"""))
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec et quam at eros dignissim accumsan. Aenean quis sagittis dolor. Ut justo nisl, lobortis nec elit id, dictum ullamcorper ipsum. Fusce eu ullamcorper eros, nec feugiat lectus.
Albert Einstein.
License
markdownmaker is licensed under the zlib license.
Metadata
Release files for markdownmaker 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| markdownmaker-0.4.0.tar.gz | 4.5 kB | Without provenance | Details for markdownmaker-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| markdownmaker-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for markdownmaker-0.4.0-py3-none-any.whl |
Total release size: 10.3 kB
Release files / markdownmaker-0.4.0.tar.gz
| Download URL | markdownmaker-0.4.0.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5aa5e41f9527325280dbee2aa902000e2142a6650b5b241b1090e8fce29f1b92
|
|
BLAKE2b-256 checksum How to use checksums |
e576e5e9edf573ab781de57295ac35d8a65e47025e52e6d0594a8a0623b7728c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.1
|
Release files / markdownmaker-0.4.0-py3-none-any.whl
| Download URL | markdownmaker-0.4.0-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e62ef5a340ab9c9ce5b73cbf85a5865921821f147a99befb247f963992304a99
|
|
BLAKE2b-256 checksum How to use checksums |
cfc8453c1d88c195cc5831db6fe3fcaf8ea95c93e97ddd90b8a3b2d72b0ee835
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.1
|
Security for markdownmaker 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.