Files
nexus/raw/Skills/blogwatcher-daily收藏.md

155 lines
4.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Blogwatcher Daily 技能收藏
> RSS 订阅监控 + 每日摘要生成
## 简介
`blogwatcher-daily` 是 Hermes Agent 的一个自定义技能custom skill用于自动化监控 31 个 RSS/YouTube 订阅频道,每天定时扫描并生成阅读摘要。
---
## 核心功能
### 1. 日常扫描(定时任务)
每天自动抓取各频道**新文章**,追加写入 `YYYY-MM-DD.md`
```bash
python3 ~/.hermes/skills/custom/blogwatcher-daily/scripts/blogwatcher-daily.py
```
输出示例:
```
📊 扫描完成: 共发现 12 篇新文章
📝 已写入: /Users/weishen/Workspace/nexus/ishenwei/blogwatcher/2026-04-18.md
```
### 2. 历史回扫(手动,例外场景)
强制抓取每个频道**最近 10 篇**(无论是否已读),写入独立文件:
```bash
python3 ~/.hermes/skills/custom/blogwatcher-daily/scripts/blogwatcher-daily.py --all
```
输出:`all-YYYY-MM-DD.md`(每次运行覆盖,不追加到日报)
### 3. 只看不写(调试)
```bash
python3 ~/.hermes/skills/custom/blogwatcher-daily/scripts/blogwatcher-daily.py --scan-only
```
---
## 订阅频道
**31 个频道**,分为两类:
### YouTube18个— 通过 RSSHub 转换
RSSHub 地址:`http://192.168.3.45:1200`
| 频道 | 说明 |
|------|------|
| Tech With Tim | AI/LLM 开发 |
| Jon Law | AI 工具、商业 |
| 小白AI笔记 | Hermes Agent 中文 |
| Yannic Kilcher | 深度学习 |
| 3Blue1Brown | 数学可视化 |
| Sentdex | Python/ML |
| ... | 共 18 个 |
### RSS 直订13个
| 频道 | URL | 说明 |
|------|-----|------|
| 少数派 | 直接 | 科技精选 |
| Slashdot | 直接 | 英文科技新闻 |
| AWS Blog | 直接 | 云计算 |
| SRE Weekly | 直接 | SRE 周报 |
| SaltTiger | 直接 | 技术新闻 |
| TED Talks Daily | 直接 | TED 演讲 |
| ... | | 共 13 个 |
---
## 文件结构
```
~/.hermes/skills/custom/blogwatcher-daily/
├── SKILL.md # 技能说明文档
└── scripts/
├── blogwatcher-daily.py # 主脚本
├── subscriptions.txt # 订阅列表name|URL
└── blogwatcher.db # SQLite 数据库(记录已读状态)
```
**输出目录:**
```
~/Workspace/nexus/ishenwei/blogwatcher/
├── 2026-04-18.md # 每日日报(追加模式)
└── all-2026-04-18.md # 历史回扫(覆盖模式)
```
---
## 定时任务
- **Cron ID**`ecdd35bb7df3`
- **调度**`0 6 * * *`(每天早上 6:00
- **执行**Hermes Agent 自动调用 skill 中的脚本
- **通知**Telegram`deliver=origin`
---
## 使用技巧
### 添加新订阅
```bash
# RSS 直订
python3 blogwatcher-daily.py --add "频道名" "https://example.com/feed"
# YouTube 频道(自动转 RSSHub
python3 blogwatcher-daily.py --add "频道名" "https://youtube.com/channel/UCxxxx"
```
### 强制回扫某频道(例外)
```bash
python3 blogwatcher-daily.py --all
```
> 适用于:新增订阅需要补历史、某个频道很久没看想批量回顾
### 调试扫描逻辑
```bash
python3 blogwatcher-daily.py --scan-only
```
> 只打印,不写文件
---
## 技术细节
- **RSS 解析库**`feedparser`(支持 RSS 1.0/2.0/Atom、GB2312/GBK 编码、畸形 XML
- **去重机制**SQLite 数据库按 `url` 排重,已读链接不重复写入
- **YouTube 支持**:通过 RSSHub 将 YouTube Channel ID 转为 RSS Feed
- **编码处理**:自动检测 GB2312、GBK、ISO-8859-1解决乱码问题
---
## 已解决的问题
-**RSS 1.0 支持**Slashdot 使用 RSS 1.0,换用 feedparser 解决
-**GB2312 乱码**:阿榮福利味等台媒使用 GB2312 编码feedparser 自动处理
-**畸形 XML**:异次元等小站 XML 不规范feedparser 兜底
-**YouTube RSSHub**RSSHub 代理 YouTube Feed绕过直接访问限制
-**追加写入**:日常扫描正确追加到日报,不覆盖历史内容
-**独立 force-all**:强制回扫写入独立文件,不污染日报
---
## 注意事项
- **How to of the Day**wikiHow 禁止所有爬虫,无法抓取,永远返回 0 篇
- **FeedBurner 频道**:電腦玩物、阿榮福利味使用 FeedBurner 跳转RSSHub 可能不稳定,建议使用直接 FeedBurner URL
- **`--all` 不要加到 cron**force-all 是例外操作,每日 cron 保持日常扫描即可
---
*收藏日期2026-04-18*