Skip to main content

Connect Markdown Renderer

Project description

CloudBlue Connect Markdown Renderer

pyversions PyPi Status Build Status codecov Quality Gate Status

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:

Console markdown

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

connect-markdown-renderer-2.0.1.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

connect_markdown_renderer-2.0.1-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file connect-markdown-renderer-2.0.1.tar.gz.

File metadata

  • Download URL: connect-markdown-renderer-2.0.1.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.4 Linux/5.13.0-1022-azure

File hashes

Hashes for connect-markdown-renderer-2.0.1.tar.gz
Algorithm Hash digest
SHA256 fbaefff195a6c347a7f89e75a09e78f6be35c903d72a2766c8f263ca75758757
MD5 f13fcf3da9dfa30c84368070987e220a
BLAKE2b-256 088180770821927c1c9cac597331f0d99074c35d5a1910c9feaa348e8e6c47e3

See more details on using hashes here.

File details

Details for the file connect_markdown_renderer-2.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for connect_markdown_renderer-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8d726b947d877697a42f528799908481685bf0db6a17b4e6d715389bfae9cccd
MD5 ee7185577ed5a37fff58ce5c9b7200e2
BLAKE2b-256 ce7733cd48d95109243ac736228e1e576fe8c67e20a875c393f3f5650e4f936f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page