Loading...
Loading...
A tool for converting Markdown to WeChat Official Account HTML, supporting full inline styles, system font stacks, rich components, custom theme colors and metadata, generating HTML compatible with WeChat Official Account Editor. Use when: - Convert Markdown to WeChat Official Account HTML - WeChat article formatting - Articles with custom theme colors - Batch WeChat content generation - Publish tech articles to WeChat Official Account - WeChat style components Cross-references: content-extractor, long-form-writer, document-hub, wechat-article-fetcher, image-ocr Part of UniqueClub toolkit. Learn more: https://uniqueclub.ai
npx skill4agent add wulaosiji/skills md-to-wechat# Article Main Title
## Section Title
### Subsection Title
> Quoted Content
- List Item
| Table | Data |converter = MarkdownToWechatConverter(
title="Article Title",
subtitle="Subtitle",
author="Author Name",
tags=["Tag1", "Tag2"]
)./skills/md-to-wechat/scripts/md-to-wechat.sh input.md -o output.html| Markdown | WeChat Official Account Style |
|---|---|
| Article main title (cover area) |
| Section title (with golden decorative line) |
| Subsection title (with left border) |
| Quote block (with large quote decoration) |
| Black bold text |
| Inline code (coral color) |
| Dark background code block |
| Exquisite table (dark header) |
| Unordered list |
| Scenario card (coral border) |
| Conclusion box (dark background) |
# Basic Usage
./skills/md-to-wechat/scripts/md-to-wechat.sh input.md
# Specify Output File
./skills/md-to-wechat/scripts/md-to-wechat.sh input.md -o output.html
# Full Parameters
./skills/md-to-wechat/scripts/md-to-wechat.sh input.md \
-o output.html \
-t "Article Title" \
-s "Subtitle Description" \
-a "Author Name" \
--tags "Tag1,Tag2,Tag3"from skills.md_to_wechat.md_to_wechat import MarkdownToWechatConverter
# Create Converter
converter = MarkdownToWechatConverter(
title="Article Title",
subtitle="Subtitle",
author="Author",
tags=["Tag1", "Tag2"]
)
# Convert Markdown
with open('input.md', 'r', encoding='utf-8') as f:
markdown_text = f.read()
html = converter.convert(markdown_text)
# Save
with open('output.html', 'w', encoding='utf-8') as f:
f.write(html)<div style="display:flex;align-items:center;gap:12px;">
<div style="width:6px;height:28px;background:#d4a574;border-radius:3px;"></div>
<h2>Section Title</h2>
</div>> Quoted Content
> —— Author Name【Scenario Recap】
Here is the scenario description content...【Conclusion】
Here is the conclusion content...| Item | Cost | Frequency |
|------|------|------|
| Token | $0.003 | Recurring |
| Server | $20 | Monthly |```json
{
"key": "value"
}
## Theme Colors
Default theme uses gold + coral colors, customizable:
```python
colors = {
'primary': '#d4a574', # Gold - Primary Color
'accent': '#e07a5f', # Coral - Accent Color
'dark': '#2d3436', # Dark - Table Header
'text': '#1a1a1a', # Main Text
'text_secondary': '#666', # Secondary Text
'bg_light': '#f5f5f5', # Light Gray Background
'bg_card': '#f8f9fa', # Card Background
}
converter = MarkdownToWechatConverter(colors=colors)| Skill | Relationship | Use Case |
|---|---|---|
| content-extractor | Content Source | Extract content before publishing to WeChat Official Account |
| long-form-writer | Content Generation | Generate long-form Markdown articles |
| document-hub | Format Supplement | Generate Word/PDF versions |
| wechat-article-fetcher | Reverse Operation | Crawl WeChat Official Account articles |
| image-ocr | Auxiliary Recognition | Recognize text from images into articles |
from skills.long_form_writer import expand_outline
from skills.md_to_wechat.md_to_wechat import MarkdownToWechatConverter
# Generate Long-form Article
markdown_text = expand_outline(outline_path="outline.md")
# Convert to WeChat Official Account HTML
converter = MarkdownToWechatConverter(
title="Article Title",
subtitle="Subtitle",
author="Author"
)
html = converter.convert(markdown_text)
# Save
with open("wechat.html", "w", encoding="utf-8") as f:
f.write(html)