openring rs
1.0.0
openring-rs
是一个用于从 Atom/RSS 源生成网络环的工具,因此您可以使用这些源中的文章填充模板并将它们嵌入到您自己的博客中。 in.html
中提供了示例模板。
这是 Drew DeVault 的 openring 的 Rust 移植版,主要区别在于:
--cache
时尊重限制并发送条件请求(推荐!)--before
过滤提要要查看此操作的实际效果,您可以查看此博客文章的页脚。
https://luke.hsiao.dev/blog/openring-rs/
cargo install --locked openring
A webring for static site generators written in Rust
Usage: openring [OPTIONS] --template-file <FILE>
Options:
-n, --num-articles <NUM_ARTICLES> Total number of articles to fetch [default: 3]
-p, --per-source <PER_SOURCE> Number of most recent articles to get from each feed [default: 1]
-S, --url-file <FILE> File with URLs of Atom/RSS feeds to read (one URL per line, lines starting with '#' or "//" are ignored)
-t, --template-file <FILE> Tera template file
-s, --url <URL> A single URL to consider (can be repeated to specify multiple)
-b, --before <BEFORE> Only include articles before this date (in YYYY-MM-DD format)
-c, --cache Use request cache stored on disk at `.openringcache`
--max-cache-age <MAX_CACHE_AGE> Discard all cached requests older than this duration [default: 14d]
-v, --verbose... Increase logging verbosity
-q, --quiet... Decrease logging verbosity
-h, --help Print help (see more with '--help')
-V, --version Print version
openring-rs
支持的模板是使用 Tera 编写的。有关详细信息,请参阅 Tera 文档。
只是为了好玩。