# CloudBlue Connect Markdown Renderer
![pyversions](https://img.shields.io/pypi/pyversions/connect-markdown-renderer.svg) [![PyPi Status](https://img.shields.io/pypi/v/connect-markdown-renderer.svg)](https://pypi.org/project/connect-markdown-renderer/) [![Build Status](https://github.com/cloudblue/connect-markdown-renderer/workflows/Build%20Connect%20Markdown%20Renderer/badge.svg)](https://github.com/cloudblue/connect-markdown-renderer/actions) [![codecov](https://codecov.io/gh/cloudblue/connect-markdown-renderer/branch/master/graph/badge.svg)](https://codecov.io/gh/cloudblue/connect-markdown-renderer) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=markdown-renderer&metric=alert_status)](https://sonarcloud.io/dashboard?id=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:
```sh
$ pip install connect-markdown-renderer
```
## Usage example
```python
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:
![Console markdown](screenshot_1.png)
## Features
`connect-markdown-renderer` uses the new [markdown-it-py](https://github.com/executablebooks/markdown-it-py) parser and supports
[CommonMark](https://commonmark.org) plus the following extensions:
* tables
* strikethrough
* emoji
`connect-markdown-renderer` uses [rich](https://github.com/Textualize/rich) to render the markdown in the terminal.
## License
`connect-markdown-renderer` is released under the [Apache License Version 2.0](https://www.apache.org/licenses/LICENSE-2.0).
Raw data
{
"_id": null,
"home_page": "https://connect.cloudblue.com",
"name": "connect-markdown-renderer",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8,<4",
"maintainer_email": "",
"keywords": "",
"author": "CloudBlue",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/37/6b/f8fe989c9b2283f3e1aea3ac9b3101d555258d721d700ea886f0b1fc7525/connect_markdown_renderer-3.0.0.tar.gz",
"platform": null,
"description": "# CloudBlue Connect Markdown Renderer\n\n\n![pyversions](https://img.shields.io/pypi/pyversions/connect-markdown-renderer.svg) [![PyPi Status](https://img.shields.io/pypi/v/connect-markdown-renderer.svg)](https://pypi.org/project/connect-markdown-renderer/) [![Build Status](https://github.com/cloudblue/connect-markdown-renderer/workflows/Build%20Connect%20Markdown%20Renderer/badge.svg)](https://github.com/cloudblue/connect-markdown-renderer/actions) [![codecov](https://codecov.io/gh/cloudblue/connect-markdown-renderer/branch/master/graph/badge.svg)](https://codecov.io/gh/cloudblue/connect-markdown-renderer) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=markdown-renderer&metric=alert_status)](https://sonarcloud.io/dashboard?id=markdown-renderer)\n\n\n## Introduction\n\n`connect-markdown-renderer` is a small library that allow to render markdown documents in a terminal shell.\n\n\n## Install\n\n`connect-markdown-renderer` can be installed from pypi.org with pip:\n\n```sh\n\n$ pip install connect-markdown-renderer\n\n```\n\n## Usage example\n\n```python\n\nfrom connect.utils.terminal.markdown import render\n\nmy_md = \"\"\"\n\n# Heading level 1 - Paragraph\n\nThis is a paragraph with inline formatting like *italic*, **strong**, ~~strikethrough~~, `inline code` and :clapping_hands: emojis!.\n\n## Heading level 2 - Lists\n\n*Ordered list:*\n\n1. First item\n2. Second item\n3. Third item\n\n**Unordered list:**\n\n* First\n* Second\n* Third\n\n### Heading level 3 - blockquote\n\n> This is a blockquote.\n> > ...and a nested blockquote.\n\n\n#### Heading level 4 - tables\n\n| Col 1 | Col 2 | Col 3 |\n|:------|:-----:|------:|\n| a | b | c |\n\n\n##### Heading level 5 - codeblock\n\n\n```python\n\ndef this_is_my_python_function(args):\n return 'Hello World!'\n\n\n\"\"\"\n\nprint(render(my_md))\n\n```\n\nThis code will produce the following output:\n\n![Console markdown](screenshot_1.png)\n\n\n\n## Features\n\n`connect-markdown-renderer` uses the new [markdown-it-py](https://github.com/executablebooks/markdown-it-py) parser and supports\n[CommonMark](https://commonmark.org) plus the following extensions:\n\n* tables\n* strikethrough\n* emoji\n\n`connect-markdown-renderer` uses [rich](https://github.com/Textualize/rich) to render the markdown in the terminal.\n\n\n## License\n\n`connect-markdown-renderer` is released under the [Apache License Version 2.0](https://www.apache.org/licenses/LICENSE-2.0).\n\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Connect Markdown Renderer",
"version": "3.0.0",
"project_urls": {
"Documentation": "https://github.com/cloudblue/connect-markdown-renderer",
"Homepage": "https://connect.cloudblue.com",
"Repository": "https://github.com/cloudblue/connect-markdown-renderer"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "67842ff369292fbb776be515fd4c292b85ee0779b61f6f95d58b29805278f29b",
"md5": "88cb39c47ccdb415b6b2b569e033b2ab",
"sha256": "078ab8830f520edc9d4c87ee963820ea70b84fccc72cf1d052e2ba7207c157ab"
},
"downloads": -1,
"filename": "connect_markdown_renderer-3.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "88cb39c47ccdb415b6b2b569e033b2ab",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8,<4",
"size": 11551,
"upload_time": "2023-05-29T15:30:32",
"upload_time_iso_8601": "2023-05-29T15:30:32.838923Z",
"url": "https://files.pythonhosted.org/packages/67/84/2ff369292fbb776be515fd4c292b85ee0779b61f6f95d58b29805278f29b/connect_markdown_renderer-3.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "376bf8fe989c9b2283f3e1aea3ac9b3101d555258d721d700ea886f0b1fc7525",
"md5": "af5831e31db82f418c6e2217dd4afae6",
"sha256": "0dc1fd6229af84b624da40bbaae1d64f81ce105bfa451fa8baa808796191f9d3"
},
"downloads": -1,
"filename": "connect_markdown_renderer-3.0.0.tar.gz",
"has_sig": false,
"md5_digest": "af5831e31db82f418c6e2217dd4afae6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8,<4",
"size": 10833,
"upload_time": "2023-05-29T15:30:35",
"upload_time_iso_8601": "2023-05-29T15:30:35.053447Z",
"url": "https://files.pythonhosted.org/packages/37/6b/f8fe989c9b2283f3e1aea3ac9b3101d555258d721d700ea886f0b1fc7525/connect_markdown_renderer-3.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-29 15:30:35",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "cloudblue",
"github_project": "connect-markdown-renderer",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "connect-markdown-renderer"
}