行业情报官 - 自动化的行业情报采集与推送系统
平台采集方式频率建议GitHub TrendingRSS / API每日 2 次X (Twitter)fxtwitter API每日 2 次知乎热榜RSSHub每日 2 次
平台采集方式频率建议36krRSS每日 1 次掘金RSS每日 1 次微博热搜RSSHub每日 1 次微信读书榜RSSHub每周 1 次
bash
# 必填
FXTWITTER_API_TOKEN=your_token # 可选,无则用公开接口
# 推送配置 (至少配置一个)
FEISHU_WEBHOOK=your_webhook
DINGTALK_WEBHOOK=your_webhook
TELEGRAM_BOT_TOKEN=your_token
TELEGRAM_CHAT_ID=your_chat_id
SMTP_HOST=smtp.example.com
SMTP_PORT=587
SMTP_USER=your_email
SMTP_PASS=your_password
TO_EMAIL=target@example.com
在 memory/intelligence/sources.yaml 中配置:
yaml
sources:
- name: github-trending
url: https://github.com/trending?since=weekly
enabled: true
priority: p0
tags: [AI, 开源]
- name: x-ai-news
query: "AI OR LLM OR Agent"
enabled: true
priority: p0
tags: [AI, 大模型]
- name: zhihu-hot
url: https://www.zhihu.com/hot
enabled: true
priority: p0
tags: [科技, 热点]
text
定时触发 (Cron)
│
▼
获取采集源列表 (按优先级)
│
▼
并行抓取各平台数据
│
├── GitHub → 解析 trending 页面
├── X → fxtwitter API
└── RSS → 解析 XML
│
▼
AI 摘要生成
│
├── 提取标题、链接、描述
├── 生成一句话摘要
└── 分类打标签
│
▼
格式化输出
│
├── Markdown 格式
└── HTML 格式
│
▼
推送到目标渠道
│
├── 飞书 Webhook
├── 钉钉 Webhook
└── Telegram Bot
markdown
## 📊 行业情报 {日期}
### 🔥 GitHub Trending
1. **[项目名]** - ⭐1234
描述文本...
Tags: #AI #开源
2. **[项目名]** - ⭐987
...
### 🐦 X 热点
1. @username: 推文内容...
链接
### 📰 知乎热榜
1. 问题标题
热度和链接
text
memory/intelligence/
├── sources.yaml # 采集源配置
├── cache/ # 缓存已推送内容 (去重)
│ └── sent.json
├── logs/ # 采集日志
│ └── 2026-03-24.md
└── summaries/ # 生成的摘要
└── 2026-03-24.md
bash
# 采集并推送到默认渠道
openclaw intelligence fetch
# 仅采集不推送 (预览)
openclaw intelligence fetch --dry-run
# 指定采集源
openclaw intelligence fetch --source github-trending
bash
# 每日 9:00 和 15:00 采集
openclaw cron add --schedule "0 9,15 * * *" --task intelligence
bash
# 查看今日情报
cat memory/intelligence/summaries/2026-03-24.md
# 查看指定日期
openclaw intelligence history --date 2026-03-23
curl - HTTP 请求python3 - 解析和摘要xmllint - RSS 解析 (可选)fxtwitter - Twitter/X 数据采集在 sources.yaml 添加:
yaml
- name: my-source
url: https://example.com/feed
type: rss # 或 html, api
enabled: true
priority: p1
tags: [自定义]
实现对应的 Webhook 发送函数:
python
def send_to_dingtalk(webhook, message):
# 实现钉钉推送
pass
def send_to_telegram(token, chat_id, message):
# 实现 Telegram 推送
pass