A small command line quality gate for WeChat Official Account article drafts.
It validates a draft JSON file before publishing or uploading. The first release focuses on practical checks:
- required article fields
- title and digest length
- comment settings
- local image references
- placeholder text
- common AI-sounding phrases in Chinese copy
- explicit save-draft vs direct-publish intent
- generic interaction-bait endings
The project is intentionally small so maintainers can extend rules without needing a full CMS or publishing pipeline.
See publishing workflow notes for practical WeChat release guidance captured from real publishing operations.
python -m pip install -e .wechat-draft-guard validate examples/draft.valid.json
Use JSON output when integrating with scripts:
wechat-draft-guard validate examples/draft.valid.json --format json
Use a project-specific rule config:
wechat-draft-guard validate examples/draft.valid.json --config examples/rules.config.json
Run a daily operations review from a metrics CSV:
wechat-draft-guard review-daily examples/daily-metrics.csv --date 2026年06月02日
The daily review compares the target date with the previous publishing date and flags:
- severe total-view drops
- batches where most articles have 10 views or fewer
- zero recommendation-source reads when that column is available
- entertainment titles that are too long or too explanatory
The JSON shape is documented in
schema/draft.schema.json.
{
"title": "Example title",
"digest": "Short summary",
"content": "<p>Article HTML or plain text.</p>",
"thumb_media_path": "images/cover.jpg",
"need_open_comment": 1,
"only_fans_can_comment": 1,
"publish_mode": "save_draft"
}0: no issues found1: warnings or errors found2: invalid input or unreadable file
- HTML structure checks for WeChat article body
- image size and dimension validation
- exportable pre-publish report
- optional integration with WeChat draft upload scripts
See CONTRIBUTING.md.
MIT