CommonMark-Slack
CommonMark-Slack extends the commonmark.py library to add rendering of the Slack flavor of Markdown. This can be handy if you are already using standard Markdown for another purpose and would like to also produce Slack output from the same source. CommonMark-slack also allows for producing plaintext from standard Markdown, useful for the areas of Slack that use unadorned text.
Installation
You can install CommonMark-Slack from PyPI:
pip install commonmark-slack
The commonmark-slack package is supported by Python 3.6 and above.
Usage
import commonmarkslack
parser = commonmarkslack.Parser()
ast = parser.parse("Hello *World*")
renderer = commonmark.SlackRenderer()
slack_md = renderer.render(ast)
print(slack_md) # Hello _World_
renderer = commonmarkslack.PlainTextRenderer()
plain_text = renderer.render(ast)
print(plain_text) # Hello World
Metadata
Release files for commonmark-slack 1.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 | |
|---|---|---|---|
| commonmark-slack-1.0.0.tar.gz | 3.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| commonmark_slack-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.8 kB
Release files / commonmark-slack-1.0.0.tar.gz
| Download URL | commonmark-slack-1.0.0.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
da21444432d8cef79dbe5166776700640c704f52b8f758cfe83cc6e38278e52e
|
|
BLAKE2b-256 checksum How to use checksums |
5b758aeea7d231c8e1cc7be2eeedcdf8dd5f940354220744d6db5729b6ae426a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.23.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.5
|
Release files / commonmark_slack-1.0.0-py3-none-any.whl
| Download URL | commonmark_slack-1.0.0-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6e2623f274ba5a859d96e32686e4e6fa73b851341d6fcb17b44605a2be7f8f76
|
|
BLAKE2b-256 checksum How to use checksums |
44fe562b3da39894d0e66333d9d97ee8eb5c54d140b9e9ae63a694dea734bd9c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.23.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.5
|