blogwatcher
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBlogwatcher
Blogwatcher
Track blog and RSS/Atom feed updates with the tool. Supports automatic feed discovery, HTML scraping fallback, OPML import, and read/unread article management.
blogwatcher-cli使用工具追踪博客及RSS/Atom订阅源的更新。支持订阅源自动发现、HTML抓取降级方案、OPML导入以及已读/未读文章管理。
blogwatcher-cliInstallation
安装
Pick one method:
- Go:
go install github.com/JulienTant/blogwatcher-cli/cmd/blogwatcher-cli@latest - Docker:
docker run --rm -v blogwatcher-cli:/data ghcr.io/julientant/blogwatcher-cli - Binary (Linux amd64):
curl -sL https://github.com/JulienTant/blogwatcher-cli/releases/latest/download/blogwatcher-cli_linux_amd64.tar.gz | tar xz -C /usr/local/bin blogwatcher-cli - Binary (Linux arm64):
curl -sL https://github.com/JulienTant/blogwatcher-cli/releases/latest/download/blogwatcher-cli_linux_arm64.tar.gz | tar xz -C /usr/local/bin blogwatcher-cli - Binary (macOS Apple Silicon):
curl -sL https://github.com/JulienTant/blogwatcher-cli/releases/latest/download/blogwatcher-cli_darwin_arm64.tar.gz | tar xz -C /usr/local/bin blogwatcher-cli - Binary (macOS Intel):
curl -sL https://github.com/JulienTant/blogwatcher-cli/releases/latest/download/blogwatcher-cli_darwin_amd64.tar.gz | tar xz -C /usr/local/bin blogwatcher-cli
All releases: https://github.com/JulienTant/blogwatcher-cli/releases
选择以下任一方式:
- Go:
go install github.com/JulienTant/blogwatcher-cli/cmd/blogwatcher-cli@latest - Docker:
docker run --rm -v blogwatcher-cli:/data ghcr.io/julientant/blogwatcher-cli - 二进制文件(Linux amd64):
curl -sL https://github.com/JulienTant/blogwatcher-cli/releases/latest/download/blogwatcher-cli_linux_amd64.tar.gz | tar xz -C /usr/local/bin blogwatcher-cli - 二进制文件(Linux arm64):
curl -sL https://github.com/JulienTant/blogwatcher-cli/releases/latest/download/blogwatcher-cli_linux_arm64.tar.gz | tar xz -C /usr/local/bin blogwatcher-cli - 二进制文件(macOS Apple Silicon):
curl -sL https://github.com/JulienTant/blogwatcher-cli/releases/latest/download/blogwatcher-cli_darwin_arm64.tar.gz | tar xz -C /usr/local/bin blogwatcher-cli - 二进制文件(macOS Intel):
curl -sL https://github.com/JulienTant/blogwatcher-cli/releases/latest/download/blogwatcher-cli_darwin_amd64.tar.gz | tar xz -C /usr/local/bin blogwatcher-cli
Docker with persistent storage
带持久化存储的Docker部署
By default the database lives at . In Docker this is lost on container restart. Use or a volume mount to persist it:
~/.blogwatcher-cli/blogwatcher-cli.dbBLOGWATCHER_DBbash
undefined默认情况下,数据库位于。在Docker中,容器重启后该数据会丢失。可使用环境变量或卷挂载来实现持久化:
~/.blogwatcher-cli/blogwatcher-cli.dbBLOGWATCHER_DBbash
undefinedNamed volume (simplest)
命名卷(最简单方式)
docker run --rm -v blogwatcher-cli:/data -e BLOGWATCHER_DB=/data/blogwatcher-cli.db ghcr.io/julientant/blogwatcher-cli scan
docker run --rm -v blogwatcher-cli:/data -e BLOGWATCHER_DB=/data/blogwatcher-cli.db ghcr.io/julientant/blogwatcher-cli scan
Host bind mount
主机绑定挂载
docker run --rm -v /path/on/host:/data -e BLOGWATCHER_DB=/data/blogwatcher-cli.db ghcr.io/julientant/blogwatcher-cli scan
undefineddocker run --rm -v /path/on/host:/data -e BLOGWATCHER_DB=/data/blogwatcher-cli.db ghcr.io/julientant/blogwatcher-cli scan
undefinedMigrating from the original blogwatcher
从原版blogwatcher迁移
If upgrading from , move your database:
Hyaxia/blogwatcherbash
mv ~/.blogwatcher/blogwatcher.db ~/.blogwatcher-cli/blogwatcher-cli.dbThe binary name changed from to .
blogwatcherblogwatcher-cli如果从升级,请迁移你的数据库:
Hyaxia/blogwatcherbash
mv ~/.blogwatcher/blogwatcher.db ~/.blogwatcher-cli/blogwatcher-cli.db二进制文件名已从变更为。
blogwatcherblogwatcher-cliCommon Commands
常用命令
Managing blogs
博客管理
- Add a blog:
blogwatcher-cli add "My Blog" https://example.com - Add with explicit feed:
blogwatcher-cli add "My Blog" https://example.com --feed-url https://example.com/feed.xml - Add with HTML scraping:
blogwatcher-cli add "My Blog" https://example.com --scrape-selector "article h2 a" - List tracked blogs:
blogwatcher-cli blogs - Remove a blog:
blogwatcher-cli remove "My Blog" --yes - Import from OPML:
blogwatcher-cli import subscriptions.opml
- 添加博客:
blogwatcher-cli add "My Blog" https://example.com - 指定订阅源添加:
blogwatcher-cli add "My Blog" https://example.com --feed-url https://example.com/feed.xml - 启用HTML抓取添加:
blogwatcher-cli add "My Blog" https://example.com --scrape-selector "article h2 a" - 列出已追踪博客:
blogwatcher-cli blogs - 删除博客:
blogwatcher-cli remove "My Blog" --yes - 从OPML导入:
blogwatcher-cli import subscriptions.opml
Scanning and reading
扫描与阅读
- Scan all blogs:
blogwatcher-cli scan - Scan one blog:
blogwatcher-cli scan "My Blog" - List unread articles:
blogwatcher-cli articles - List all articles:
blogwatcher-cli articles --all - Filter by blog:
blogwatcher-cli articles --blog "My Blog" - Filter by category:
blogwatcher-cli articles --category "Engineering" - Mark article read:
blogwatcher-cli read 1 - Mark article unread:
blogwatcher-cli unread 1 - Mark all read:
blogwatcher-cli read-all - Mark all read for a blog:
blogwatcher-cli read-all --blog "My Blog" --yes
- 扫描所有博客:
blogwatcher-cli scan - 扫描单个博客:
blogwatcher-cli scan "My Blog" - 列出未读文章:
blogwatcher-cli articles - 列出所有文章:
blogwatcher-cli articles --all - 按博客过滤:
blogwatcher-cli articles --blog "My Blog" - 按分类过滤:
blogwatcher-cli articles --category "Engineering" - 标记文章为已读:
blogwatcher-cli read 1 - 标记文章为未读:
blogwatcher-cli unread 1 - 标记所有文章为已读:
blogwatcher-cli read-all - 标记指定博客的所有文章为已读:
blogwatcher-cli read-all --blog "My Blog" --yes
Environment Variables
环境变量
All flags can be set via environment variables with the prefix:
BLOGWATCHER_| Variable | Description |
|---|---|
| Path to SQLite database file |
| Number of concurrent scan workers (default: 8) |
| Only output "scan done" when scanning |
| Skip confirmation prompts |
| Default filter for articles by category |
所有命令行参数均可通过前缀为的环境变量设置:
BLOGWATCHER_| 变量名 | 描述 |
|---|---|
| SQLite数据库文件路径 |
| 并发扫描的工作进程数(默认值:8) |
| 扫描时仅输出"scan done" |
| 跳过确认提示 |
| 文章默认分类过滤条件 |
Example Output
示例输出
$ blogwatcher-cli blogs
Tracked blogs (1):
xkcd
URL: https://xkcd.com
Feed: https://xkcd.com/atom.xml
Last scanned: 2026-04-03 10:30$ blogwatcher-cli scan
Scanning 1 blog(s)...
xkcd
Source: RSS | Found: 4 | New: 4
Found 4 new article(s) total!$ blogwatcher-cli articles
Unread articles (2):
[1] [new] Barrel - Part 13
Blog: xkcd
URL: https://xkcd.com/3095/
Published: 2026-04-02
Categories: Comics, Science
[2] [new] Volcano Fact
Blog: xkcd
URL: https://xkcd.com/3094/
Published: 2026-04-01
Categories: Comics$ blogwatcher-cli blogs
已追踪博客(1个):
xkcd
URL: https://xkcd.com
订阅源: https://xkcd.com/atom.xml
最后扫描时间: 2026-04-03 10:30$ blogwatcher-cli scan
正在扫描1个博客...
xkcd
来源: RSS | 发现文章数: 4 | 新增文章数: 4
共发现4篇新文章!$ blogwatcher-cli articles
未读文章(2篇):
[1] [新] Barrel - Part 13
博客: xkcd
URL: https://xkcd.com/3095/
发布时间: 2026-04-02
分类: Comics, Science
[2] [新] Volcano Fact
博客: xkcd
URL: https://xkcd.com/3094/
发布时间: 2026-04-01
分类: ComicsNotes
注意事项
- Auto-discovers RSS/Atom feeds from blog homepages when no is provided.
--feed-url - Falls back to HTML scraping if RSS fails and is configured.
--scrape-selector - Categories from RSS/Atom feeds are stored and can be used to filter articles.
- Import blogs in bulk from OPML files exported by Feedly, Inoreader, NewsBlur, etc.
- Database stored at by default (override with
~/.blogwatcher-cli/blogwatcher-cli.dbor--db).BLOGWATCHER_DB - Use to discover all flags and options.
blogwatcher-cli <command> --help
- 当未提供时,会自动从博客主页发现RSS/Atom订阅源。
--feed-url - 如果RSS订阅失败且已配置,则会降级为HTML抓取。
--scrape-selector - RSS/Atom订阅源中的分类会被存储,可用于过滤文章。
- 可批量导入从Feedly、Inoreader、NewsBlur等导出的OPML文件中的博客。
- 默认数据库存储路径为(可通过
~/.blogwatcher-cli/blogwatcher-cli.db参数或--db环境变量覆盖)。BLOGWATCHER_DB - 使用查看所有参数和选项。
blogwatcher-cli <command> --help