Skip to main content

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.4.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

discord_markdown-0.4.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file discord_markdown-0.4.0.tar.gz.

File metadata

  • Download URL: discord_markdown-0.4.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.3 CPython/3.6.9 Linux/5.3.0-7642-generic

File hashes

Hashes for discord_markdown-0.4.0.tar.gz
Algorithm Hash digest
SHA256 ce317edf99606e5fe8137c554754f6eb9942caa8526415e5e89bb5afd3292c37
MD5 ad3508240f1a82410ac788252f2869bb
BLAKE2b-256 3f8cc05a5a4071a0d08fe2e49673951598c3752fdd248441f5dafe11df64bb08

See more details on using hashes here.

File details

Details for the file discord_markdown-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: discord_markdown-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.3 CPython/3.6.9 Linux/5.3.0-7642-generic

File hashes

Hashes for discord_markdown-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 94dce3ee4f0f6e889dae26fe8505f9d9ae14872957931da58c368553670f5243
MD5 91bfd65f6634023c3882ee61ee4a3f8a
BLAKE2b-256 b4f118f2e17aa8ace1930625b9e75c31ebe74dc599c47962719b773bcc2298ee

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