Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/02tyasui/markdown_to_mrkdwn
Convert Markdown to Slack's Markdown (mrkdwn)
https://github.com/02tyasui/markdown_to_mrkdwn
markdown python slack
Last synced: 12 days ago
JSON representation
Convert Markdown to Slack's Markdown (mrkdwn)
- Host: GitHub
- URL: https://github.com/02tyasui/markdown_to_mrkdwn
- Owner: 02tYasui
- License: mit
- Created: 2024-10-24T10:52:39.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-01-21T15:01:59.000Z (20 days ago)
- Last Synced: 2025-01-21T16:20:14.104Z (20 days ago)
- Topics: markdown, python, slack
- Language: Python
- Homepage: https://02tyasui.github.io/markdown_to_mrkdwn/
- Size: 5.09 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# markdown_to_mrkdwn
[![MIT License](https://img.shields.io/badge/license-MIT-green.svg?style=flat-square)](https://opensource.org/licenses/MIT)
![GitHub release (latest by date)](https://img.shields.io/github/v/release/02tYasui/markdown_to_mrkdwn)
[![PyPI Version](https://img.shields.io/pypi/v/markdown-to-mrkdwn.svg?style=flat-square&logo=python&logoColor=white)](https://pypi.org/project/markdown-to-mrkdwn/)
[![PyPI Downloads](https://static.pepy.tech/badge/markdown-to-mrkdwn)](https://pepy.tech/projects/markdown-to-mrkdwn)
[![Python Unit Tests](https://github.com/02tYasui/markdown_to_mrkdwn/actions/workflows/python-tests.yml/badge.svg)](https://github.com/02tYasui/markdown_to_mrkdwn/actions/workflows/python-tests.yml)
[![codecov](https://codecov.io/gh/02tYasui/markdown_to_mrkdwn/branch/main/graph/badge.svg)](https://codecov.io/gh/02tYasui/markdown_to_mrkdwn)
[![Documentation](https://img.shields.io/badge/docs-latest-blue.svg?style=flat-square)](https://02tyasui.github.io/markdown_to_mrkdwn/)
[![GitHub Stars](https://img.shields.io/github/stars/02tyasui/markdown_to_mrkdwn?style=social)](https://github.com/02tyasui/markdown_to_mrkdwn)A library for converting Markdown to Slack's mrkdwn format
## Features
- Supports conversion from Markdown to Slack's mrkdwn format
- Supports nested lists, quotes, inline code, and image URLs## Installation
```bash
pip install markdown_to_mrkdwn
```## Usage
Here's a simple example of how to use the library:
```python
from markdown_to_mrkdwn import SlackMarkdownConverterconverter = SlackMarkdownConverter()
markdown_text = """
# header1
**bold text**
- list
[link](https://example.com)
"""
mrkdwn_text = converter.convert(markdown_text)
print(mrkdwn_text)
```Check the output in Slack Block Kit Builder:
[Slack Block Kit Builder](https://app.slack.com/block-kit-builder/T01R1PV07QQ#%7B%22blocks%22:%5B%7B%22type%22:%22section%22,%22text%22:%7B%22type%22:%22mrkdwn%22,%22text%22:%22This%20is%20a%20mrkdwn%20section%20block%20:ghost:%20*this%20is%20bold*,%20and%20~this%20is%20crossed%20out~,%20and%20%3Chttps://google.com%7Cthis%20is%20a%20link%3E%22%7D%7D%5D%7D)## Contributing
Feel free to send pull requests and issues
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details