Add your description here
Project description
md2wxhtml
A tool to convert Markdown files into a format suitable for WeChat articles, handling general content and code blocks with syntax highlighting.
Features
- Converts Markdown to HTML.
- Separates and processes code blocks for syntax highlighting and horizontal scrolling.
- Merges processed content and code blocks into a single HTML document.
Disclaimer
This project is an independent open-source tool and is not affiliated with, endorsed by, or officially connected to WeChat or Tencent.
Installation
pip install md2wxhtml
Usage
Command-line Interface
md2wxhtml --input <input_file.md> --output <output_file.html>
As a Python Library
from md2wxhtml import WeChatConverter
converter = WeChatConverter(content_theme="blue", code_theme="monokai")
conversion_result = converter.convert("Your markdown content here.")
html_output = conversion_result.html
print(html_output)
Available Themes
The content_theme argument accepts the following built-in theme names:
defaultbluedarkgithubgreenhammerred
The code_theme argument uses Pygments styles for code highlighting. You can specify any valid Pygments style name (e.g., monokai, default, friendly, colorful, etc.) to adjust the appearance of code blocks.
You can specify these names when creating a WeChatConverter instance. For example:
converter = WeChatConverter(content_theme="github", code_theme="monokai")
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 md2wxhtml-0.1.10.tar.gz.
File metadata
- Download URL: md2wxhtml-0.1.10.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97fc466c9e94e86d3decfe5d77a3f9632e1f87762f704e5274ee7839f1fcb7f6
|
|
| MD5 |
0de4469b76f41e0310297e67faddaffd
|
|
| BLAKE2b-256 |
0de91200503e5239718e8309491dd7a6a0617cfcf145989215b98ae23ffb19e1
|
Provenance
The following attestation bundles were made for md2wxhtml-0.1.10.tar.gz:
Publisher:
publish.yml on Wenjun-Mao/md2wxhtml
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
md2wxhtml-0.1.10.tar.gz -
Subject digest:
97fc466c9e94e86d3decfe5d77a3f9632e1f87762f704e5274ee7839f1fcb7f6 - Sigstore transparency entry: 262123046
- Sigstore integration time:
-
Permalink:
Wenjun-Mao/md2wxhtml@7b369f0d4ea217714db35962ba5fddc250698812 -
Branch / Tag:
refs/tags/v0.1.10 - Owner: https://github.com/Wenjun-Mao
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7b369f0d4ea217714db35962ba5fddc250698812 -
Trigger Event:
release
-
Statement type:
File details
Details for the file md2wxhtml-0.1.10-py3-none-any.whl.
File metadata
- Download URL: md2wxhtml-0.1.10-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b65e510090ea25e1897763a4d645679bb1578816986fb7513aa61f72d8bd456a
|
|
| MD5 |
e860df310430fb21627f7f2b82dd70b8
|
|
| BLAKE2b-256 |
8ec28595dcf483c65d5b0f6f42307f5ce1819aeba5d638cfed41ba2d7a2381f2
|
Provenance
The following attestation bundles were made for md2wxhtml-0.1.10-py3-none-any.whl:
Publisher:
publish.yml on Wenjun-Mao/md2wxhtml
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
md2wxhtml-0.1.10-py3-none-any.whl -
Subject digest:
b65e510090ea25e1897763a4d645679bb1578816986fb7513aa61f72d8bd456a - Sigstore transparency entry: 262123056
- Sigstore integration time:
-
Permalink:
Wenjun-Mao/md2wxhtml@7b369f0d4ea217714db35962ba5fddc250698812 -
Branch / Tag:
refs/tags/v0.1.10 - Owner: https://github.com/Wenjun-Mao
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7b369f0d4ea217714db35962ba5fddc250698812 -
Trigger Event:
release
-
Statement type: