content-factory
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseContent Factory — 内容自动生产分发工厂
Content Factory — Automated Content Production & Distribution Factory
从热点采集到内容生成到多平台发布的全流程自动化。Daniel 每天只需 2 分钟挑选主题。
End-to-end automation from hot topic collection, content generation to multi-platform publishing. Daniel only needs 2 minutes a day to select topics.
核心流程
Core Workflow
热点采集(10+平台) → AI选题评分 → 推送Top10给用户
↓
用户选择主题(或自定义)
↓
多平台内容生成(LLM)
↓
草稿审核 → 确认发布
↓
自动发布 → 数据追踪Hot Topic Collection (10+ Platforms) → AI Topic Scoring → Push Top 10 to User
↓
User Selects Topic (or Customizes)
↓
Multi-platform Content Generation (LLM)
↓
Draft Review → Confirm Publishing
↓
Auto-publishing → Data Tracking使用场景
Usage Scenarios
✅ USE when:
- "今日热点有什么" / "采集今天的热门话题"
- "帮我生成内容" / "写篇小红书文章"
- "选题评分" / "推荐今天该写什么"
- "发布到小红书/微信/Twitter"
- "运行内容工厂流水线" / "跑一遍完整流程"
- "看看今天的草稿" / "审核内容"
❌ DON'T use when:
- GEO优化(AI搜索排名)→ 用 geo-agent
- 纯SEO关键词优化 → 用 SEO 技能
- 单次写作(无流水线需求)→ 用 content-creator
✅ USE when:
- "What are today's hot topics?" / "Collect today's trending topics"
- "Help me generate content" / "Write a Xiaohongshu article"
- "Topic scoring" / "Recommend what to write today"
- "Publish to Xiaohongshu/WeChat/Twitter"
- "Run content factory pipeline" / "Execute the full workflow"
- "Check today's drafts" / "Review content"
❌ DON'T use when:
- GEO optimization (AI search ranking) → Use geo-agent
- Pure SEO keyword optimization → Use SEO skill
- One-time writing (no pipeline needs) → Use content-creator
数据目录
Data Directory
data/
├── hotpool/ # 每日热点池 (YYYY-MM-DD.json)
├── topics/ # 评分选题 (YYYY-MM-DD.json)
├── drafts/ # 生成草稿 (YYYY-MM-DD/)
├── reviewed/ # 审核通过
├── published/ # 已发布记录
├── config/ # 运行配置
│ └── sources.json # 采集源配置
├── templates/ # 平台模板
│ ├── xiaohongshu.md
│ ├── wechat.md
│ └── twitter.md
└── assets/ # 图片等素材data/
├── hotpool/ # Daily Hot Topic Pool (YYYY-MM-DD.json)
├── topics/ # Scored Topics (YYYY-MM-DD.json)
├── drafts/ # Generated Drafts (YYYY-MM-DD/)
├── reviewed/ # Reviewed & Approved
├── published/ # Publishing Records
├── config/ # Runtime Configuration
│ └── sources.json # Collection Source Configuration
├── templates/ # Platform Templates
│ ├── xiaohongshu.md
│ ├── wechat.md
│ └── twitter.md
└── assets/ # Images & Other Materials脚本说明
Script Explanation
| 脚本 | 功能 | 依赖 |
|---|---|---|
| 10+平台热点采集 | curl, python3 |
| AI选题评分(Top10) | LLM API (DeepSeek/GLM) |
| 多平台内容生成 | LLM API |
| 草稿审核推送 | Telegram API |
| 自动发布 | playwright (optional) |
| 选题卡片推送 | Telegram API |
| 全流程串联 | bash |
| 路径配置(可移植) | - |
| Script | Function | Dependencies |
|---|---|---|
| Hot Topic Collection from 10+ Platforms | curl, python3 |
| AI Topic Scoring (Top 10) | LLM API (DeepSeek/GLM) |
| Multi-platform Content Generation | LLM API |
| Draft Review & Push | Telegram API |
| Auto-publishing | playwright (optional) |
| Topic Card Push | Telegram API |
| Full Workflow Orchestration | bash |
| Path Configuration (Portable) | - |
采集源 (10+)
Collection Sources (10+)
| 平台 | 方式 | 内容类型 |
|---|---|---|
| B站热榜 | API | 视频/动态 |
| GitHub Trending | API | 开源项目 |
| API | 讨论/新闻 | |
| YouTube | API | 视频 |
| 微博热搜 | API | 社交热点 |
| 知乎热榜 | API | 深度讨论 |
| 头条 | API | 新闻资讯 |
| 抖音 | API | 短视频 |
| Twitter/X | Syndication | KOL动态 |
| LinuxDo | API | 技术社区 |
| Platform | Method | Content Type |
|---|---|---|
| Bilibili Hot Rank | API | Videos/Dynamics |
| GitHub Trending | API | Open Source Projects |
| API | Discussions/News | |
| YouTube | API | Videos |
| Weibo Hot Search | API | Social Hot Topics |
| Zhihu Hot Rank | API | In-depth Discussions |
| Toutiao | API | News & Information |
| Douyin | API | Short Videos |
| Twitter/X | Syndication | KOL Dynamics |
| LinuxDo | API | Technical Community |
安装依赖
Install Dependencies
bash
cd ~/clawd/skills/content-factory
pip install -r requirements.txtbash
cd ~/clawd/skills/content-factory
pip install -r requirements.txt完整流水线
Complete Pipeline
bash
undefinedbash
undefined手动执行全流程
Manually execute the full workflow
bash scripts/run_portable.sh
bash scripts/run_portable.sh
或分步执行
Or execute step by step
python3 scripts/aggregator/fetch_all.py # Step 1: 热点采集
python3 scripts/topic_scorer.py # Step 2: AI评分
python3 scripts/topic_presenter.py # Step 3: 推送选题
python3 scripts/content_generator.py --top 3 # Step 4: 内容生成
python3 scripts/draft_reviewer.py --all # Step 5: 草稿审核
python3 scripts/aggregator/fetch_all.py # Step 1: Hot Topic Collection
python3 scripts/topic_scorer.py # Step 2: AI Scoring
python3 scripts/topic_presenter.py # Step 3: Push Topics
python3 scripts/content_generator.py --top 3 # Step 4: Content Generation
python3 scripts/draft_reviewer.py --all # Step 5: Draft Review
python3 scripts/auto_publisher.py # Step 6: 发布(需确认)
python3 scripts/auto_publisher.py # Step 6: Publish (confirmation required)
undefinedundefined与 Ralph CEO Loop 配合
Integration with Ralph CEO Loop
内容工厂可以通过 Ralph CEO Loop 进行持续迭代:
- 小data: 热点采集 + 数据清洗
- 小research: 话题深度调研
- 小content: 内容生成 + 文案优化
- 小pm: 流程协调 + 质量验收
- 小market: 发布策略 + 渠道优化
The Content Factory can be continuously iterated via Ralph CEO Loop:
- Small Data: Hot Topic Collection + Data Cleaning
- Small Research: In-depth Topic Research
- Small Content: Content Generation + Copy Optimization
- Small PM: Workflow Coordination + Quality Acceptance
- Small Market: Publishing Strategy + Channel Optimization
配置
Configuration
采集源配置 (data/config/sources.json
)
data/config/sources.jsonCollection Source Configuration (data/config/sources.json
)
data/config/sources.json可启用/禁用各平台,配置关注的账号、频道等。
Enable/disable platforms, configure followed accounts, channels, etc.
LLM 配置
LLM Configuration
评分和生成使用 OpenAI-compatible API:
- 默认: DeepSeek (评分) + GLM-5 (生成)
- 通过环境变量 /
LLM_API_KEY覆盖LLM_BASE_URL
Scoring and generation use OpenAI-compatible APIs:
- Default: DeepSeek (scoring) + GLM-5 (generation)
- Override via environment variables /
LLM_API_KEYLLM_BASE_URL