daily-digest-workflow.md 2.92 KB

Daily Digest Workflow (完整日报生成流程)

Overview

从微信群聊消息到信息图的完整自动化流程。

Step 1: Extract Messages

# Query WeChat database for today's messages
python3 scripts/wechat_digest_generator.py --group "8-TG0和朋友们的AGI" --output /sdcard/WeChatDigest/

Extracts:

  • 公众号文章 (type=49): title, description, URL, source
  • 聊天记录 (type=1): sender, content, timestamp

Step 2: Generate Report

Report structure:

# {Group Name} 日报 — {Date}

## 📰 头条热点
{Headline article}

## 📑 精选文章 ({N}篇)
### 1. {Title}
**来源**: {Source}
**摘要**: {Summary}
**链接**: {URL}

## 💬 群聊讨论精选 ({N}个话题)
### 话题1: {Topic}
**参与者**: {Members}
**核心观点**:
- {View 1}
- {View 2}

## 📊 数据统计
| 指标 | 数值 |
|------|------|
| 公众号文章 | {N}篇 |
| 讨论话题 | {N}个 |
| 活跃成员 | {N}位 |

## 🔍 技术趋势总结
1. {Trend 1}
2. {Trend 2}

Step 3: Kimi Deep Analysis (Optional)

# Use kimi-k2.6 for advanced analysis
python3 ~/.hermes/skills/research/kimi-api/scripts/kimi_client.py --chat "Analyze this report: {report_content}"

Step 4: Generate Infographic

Using GPT Image 2 (preferred, ¥0.14/张):

python3 ~/.hermes/skills/image-generation/scripts/generate_image.py \
  "{prompt}" \
  --output /sdcard/WeChatDigest/infographic_{date}.png \
  --model "GPT Image 2"

Prompt template:

A professional vintage newspaper infographic poster for a WeChat group daily digest.
Title 'AI AGI 日报' in large bold Chinese serif font.
Beige newsprint background (#f5f0e1).
Content blocks with theme colors (blue=AI Agent, purple=LLM, green=hardware, orange=industry, red=open source, gray=discussions).
Bold Chinese headlines, one-sentence summaries, source attributions.
Statistics dashboard with icons and numbers.
Victorian borders and divider lines.
Grid layout, information-dense, 4k resolution.

Step 5: Send to Contact

# 1. Check screen state and wake up if needed
# 2. Trigger ACTION_SEND intent
am start -a android.intent.action.SEND \
  -t image/png \
  --eu android.intent.extra.STREAM file:///sdcard/WeChatDigest/infographic.png

# 3. OCR find contact "火星人"
# 4. Tap contact
# 5. OCR find "发送" button
# 6. Tap send button
# 7. Verify in chat

See screen-wake skill for wake-up procedure. See wechat-image-sender skill for complete sending workflow.

Automation

Cron job runs daily at 12:00:

# ~/.hermes/cron/wechat-daily-digest
# Auto-executes Steps 1-5 daily

Key Rules

  1. Language: All content must be in Chinese (titles, sections, descriptions)
  2. Image generation: Always use GPT Image 2 first, fallback to Gemini
  3. Screen wake: Check and wake device before UI automation
  4. OCR: Print complete raw output without filtering
  5. Send button: "发消息" IS the send button, not "选择"