Convert discord messages to HTML
Project description
Discord Markdown
I needed to render some Discord chat logs as HTML, and found that the Markdown implementation in Discord isn't quite compliant with Common Markdown as Discord uses a simplified version.
So I wrote this library that allows you to convert a discord message written in the Markdown formatting syntax specified here to html.
Installation
You can install the library from pypi
:
pip install discord-markdown
Usage
from discord_markdown.discord_markdown import convert_to_html
text = "_This_ **is** an __example__.\nThis should be a different paragraph."
html = convert_to_html(text)
assert html == '<p><i>This</i> <b>is</b> an <u>example</u>.</p><p>This should be a different paragraph.</p>'
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
discord_markdown-0.3.1.tar.gz
(4.8 kB
view hashes)
Built Distribution
Close
Hashes for discord_markdown-0.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e7dec36428f909830bedf048f4f2c812fe0d7952166aef8423d7005878d6633 |
|
MD5 | 8d05a40283bac445b12492b4065d28d9 |
|
BLAKE2b-256 | bbf56e857fd0f0c9a1eb4561ac30f101ca5363d60cd17a98440eff23d0fcb331 |