Connect Markdown Renderer
Project description
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.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file connect_markdown_renderer-3.0.0.tar.gz.
File metadata
- Download URL: connect_markdown_renderer-3.0.0.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.0 CPython/3.11.3 Linux/5.15.0-1037-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0dc1fd6229af84b624da40bbaae1d64f81ce105bfa451fa8baa808796191f9d3
|
|
| MD5 |
af5831e31db82f418c6e2217dd4afae6
|
|
| BLAKE2b-256 |
376bf8fe989c9b2283f3e1aea3ac9b3101d555258d721d700ea886f0b1fc7525
|
File details
Details for the file connect_markdown_renderer-3.0.0-py3-none-any.whl.
File metadata
- Download URL: connect_markdown_renderer-3.0.0-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.0 CPython/3.11.3 Linux/5.15.0-1037-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
078ab8830f520edc9d4c87ee963820ea70b84fccc72cf1d052e2ba7207c157ab
|
|
| MD5 |
88cb39c47ccdb415b6b2b569e033b2ab
|
|
| BLAKE2b-256 |
67842ff369292fbb776be515fd4c292b85ee0779b61f6f95d58b29805278f29b
|