Convert Markdown to Slack-friendly format.
Project description
MD2Slack - Markdown to Slack Converter
MD2Slack is a Python package that converts Markdown into Slack-compatible formatting.
Easily transform Markdown syntax into a format that works seamlessly in Slack messages, preserving formatting like bold, italics, headers, lists, tables, and code blocks.
Features
- Converts standard Markdown syntax to Slack-formatted text
- Supports headers, lists, blockquotes, code blocks, and tables
- Handles inline styles (bold, italics, strikethrough, and links)
- Preserves Slack-specific mentions (
@user,#channel) - Lightweight and efficient
Installation
You can install MD2Slack via pip:
pip install md2slack
Usage
Basic Example
Convert Markdown text into Slack-formatted output:
from md2slack import SlackMarkdown
parser = SlackMarkdown()
slack_text = parser("## Hello *world*")
print(slack_text) # Outputs: *Hello _world_*
Development & Contribution
I welcome contributions! Follow these steps to contribute:
- Fork the repository
- Clone your fork locally
git clone https://github.com/MayzTex/md2slack.git cd md2slack
- Create a new branch
git checkout -b feature-branch
- Make changes & commit
git add . git commit -m "Added new feature"
- Push & open a Pull Request
git push origin feature-branch
Running Tests
To run tests locally:
pytest
License
MD2Slack is licensed under the MIT License. See the LICENSE file for details.
Support & Feedback
If you find this project useful, consider starring it on GitHub.
For issues or feature requests, please open an issue.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file md2slack-0.1.1.tar.gz.
File metadata
- Download URL: md2slack-0.1.1.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a90b29cd1fb74113183f937f634b9912cbc513d43ffaa14297e8adc44c832537
|
|
| MD5 |
573f3de8a0e84d33b4af8294dbfd063d
|
|
| BLAKE2b-256 |
d5b6052283d515d0e7fa02f4a871f52b270e57072b0e9c14e41e404d964ad98a
|
File details
Details for the file md2slack-0.1.1-py3-none-any.whl.
File metadata
- Download URL: md2slack-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aec0be15dceedc01f2607950f07184ad3581aabcdd7446d0bf2a6f9e5de0741f
|
|
| MD5 |
8af63f466d1b3d21a8c19917664aad3b
|
|
| BLAKE2b-256 |
200e3ec8bdd3fb62f42dbfdaa4a6d2e4e98f47513e078dc69cd4b6fa8276dc59
|