CloudBlue Connect Markdown Renderer
Introduction
connect-markdown-renderer is a small library that allow to render markdown documents in a terminal shell.
Install
connect-markdown-renderer can be installed from pypi.org with pip:
$ pip install connect-markdown-renderer
Usage example
from connect.utils.terminal.markdown import render
my_md = """
# Heading level 1 - Paragraph
This is a paragraph with inline formatting like *italic*, **strong**, ~~strikethrough~~, `inline code` and :clapping_hands: emojis!.
## Heading level 2 - Lists
*Ordered list:*
1. First item
2. Second item
3. Third item
**Unordered list:**
* First
* Second
* Third
### Heading level 3 - blockquote
> This is a blockquote.
> > ...and a nested blockquote.
#### Heading level 4 - tables
| Col 1 | Col 2 | Col 3 |
|:------|:-----:|------:|
| a | b | c |
##### Heading level 5 - codeblock
```python
def this_is_my_python_function(args):
return 'Hello World!'
"""
print(render(my_md))
This code will produce the following output:
Features
connect-markdown-renderer uses the new markdown-it-py parser and supports
CommonMark plus the following extensions:
- tables
- strikethrough
- emoji
connect-markdown-renderer uses rich to render the markdown in the terminal.
License
connect-markdown-renderer is released under the Apache License Version 2.0.
Release files for connect-markdown-renderer 2.0.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 | |
|---|---|---|---|
| connect-markdown-renderer-2.0.0.tar.gz | 11.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| connect_markdown_renderer-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.5 kB
Release files / connect-markdown-renderer-2.0.0.tar.gz
| Download URL | connect-markdown-renderer-2.0.0.tar.gz |
|---|---|
| Size | 11.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d8cfbebe9e4e580defd2d4bcd916f2d2ac37f3cb56e2948bd70e27bc6be13906
|
|
BLAKE2b-256 checksum How to use checksums |
9b6134f2aea0ebffb2b3c2bcf717c2bdfbc08e31d0c64d5ef446b4cf5763e22e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.10.4 Linux/5.13.0-1022-azure
|
Release files / connect_markdown_renderer-2.0.0-py3-none-any.whl
| Download URL | connect_markdown_renderer-2.0.0-py3-none-any.whl |
|---|---|
| Size | 11.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3c90702e7c877d402560717c8584fcf1f92d571c64e6d1ddc94c6ad441f4cd08
|
|
BLAKE2b-256 checksum How to use checksums |
fa934d2e98aece71fe2857be01b14a3523d5d0f21fc128a5e68db8424b9787eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.10.4 Linux/5.13.0-1022-azure
|