blogwatcher

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Blogwatcher

Blogwatcher

Track blog and RSS/Atom feed updates with the
blogwatcher-cli
tool. Supports automatic feed discovery, HTML scraping fallback, OPML import, and read/unread article management.
使用
blogwatcher-cli
工具追踪博客及RSS/Atom订阅源的更新。支持订阅源自动发现、HTML抓取降级方案、OPML导入以及已读/未读文章管理。

Installation

安装

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
选择以下任一方式:
  • 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
~/.blogwatcher-cli/blogwatcher-cli.db
. In Docker this is lost on container restart. Use
BLOGWATCHER_DB
or a volume mount to persist it:
bash
undefined
默认情况下,数据库位于
~/.blogwatcher-cli/blogwatcher-cli.db
。在Docker中,容器重启后该数据会丢失。可使用
BLOGWATCHER_DB
环境变量或卷挂载来实现持久化:
bash
undefined

Named 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
undefined
docker run --rm -v /path/on/host:/data -e BLOGWATCHER_DB=/data/blogwatcher-cli.db ghcr.io/julientant/blogwatcher-cli scan
undefined

Migrating from the original blogwatcher

从原版blogwatcher迁移

If upgrading from
Hyaxia/blogwatcher
, move your database:
bash
mv ~/.blogwatcher/blogwatcher.db ~/.blogwatcher-cli/blogwatcher-cli.db
The binary name changed from
blogwatcher
to
blogwatcher-cli
.
如果从
Hyaxia/blogwatcher
升级,请迁移你的数据库:
bash
mv ~/.blogwatcher/blogwatcher.db ~/.blogwatcher-cli/blogwatcher-cli.db
二进制文件名已从
blogwatcher
变更为
blogwatcher-cli

Common 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
BLOGWATCHER_
prefix:
VariableDescription
BLOGWATCHER_DB
Path to SQLite database file
BLOGWATCHER_WORKERS
Number of concurrent scan workers (default: 8)
BLOGWATCHER_SILENT
Only output "scan done" when scanning
BLOGWATCHER_YES
Skip confirmation prompts
BLOGWATCHER_CATEGORY
Default filter for articles by category
所有命令行参数均可通过前缀为
BLOGWATCHER_
的环境变量设置:
变量名描述
BLOGWATCHER_DB
SQLite数据库文件路径
BLOGWATCHER_WORKERS
并发扫描的工作进程数(默认值:8)
BLOGWATCHER_SILENT
扫描时仅输出"scan done"
BLOGWATCHER_YES
跳过确认提示
BLOGWATCHER_CATEGORY
文章默认分类过滤条件

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
       分类: Comics

Notes

注意事项

  • Auto-discovers RSS/Atom feeds from blog homepages when no
    --feed-url
    is provided.
  • Falls back to HTML scraping if RSS fails and
    --scrape-selector
    is configured.
  • 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
    ~/.blogwatcher-cli/blogwatcher-cli.db
    by default (override with
    --db
    or
    BLOGWATCHER_DB
    ).
  • Use
    blogwatcher-cli <command> --help
    to discover all flags and options.
  • 当未提供
    --feed-url
    时,会自动从博客主页发现RSS/Atom订阅源。
  • 如果RSS订阅失败且已配置
    --scrape-selector
    ,则会降级为HTML抓取。
  • RSS/Atom订阅源中的分类会被存储,可用于过滤文章。
  • 可批量导入从Feedly、Inoreader、NewsBlur等导出的OPML文件中的博客。
  • 默认数据库存储路径为
    ~/.blogwatcher-cli/blogwatcher-cli.db
    (可通过
    --db
    参数或
    BLOGWATCHER_DB
    环境变量覆盖)。
  • 使用
    blogwatcher-cli <command> --help
    查看所有参数和选项。