13 releases

new 0.2.2 Apr 18, 2024
0.2.1 Apr 17, 2024
0.1.10 Mar 19, 2024
0.1.6 Feb 28, 2024

#1614 in Command line utilities

Download history 19/week @ 2024-02-11 359/week @ 2024-02-18 246/week @ 2024-02-25 15/week @ 2024-03-03 170/week @ 2024-03-10 405/week @ 2024-03-17 3/week @ 2024-03-24 19/week @ 2024-03-31 133/week @ 2024-04-07 411/week @ 2024-04-14

594 downloads per month

MIT/Apache

280KB
7K SLoC

Syndicationd

CI Release

Demo

Syndicationd(synd) is a TUI feed viewer, based on feed-rs and ratatui.

Website

Features

  • Subscribe feeds(RSS1, RSS2, Atom, JSON) and browse latest entries
  • Open the entry in a browser
  • Filter entries by categories and requirement

Install

nix

nix profile install github:ymgyt/syndicationd

arch linux

pacman -S syndicationd

brew

brew tap ymgyt/syndicationd
brew install synd
# or
brew install ymgyt/homebrew-syndicationd/synd

shell

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/ymgyt/syndicationd/releases/download/synd-term-v0.2.2/synd-term-installer.sh | sh

cargo

cargo install synd-term --locked

npm

npm install @syndicationd/synd-term

powershell

powershell -c "irm https://github.com/ymgyt/syndicationd/releases/download/synd-term-v0.2.2/synd-term-installer.ps1 | iex"

Usage

synd will start the TUI application.

Click to show a complete list of options
Usage: synd [OPTIONS] [COMMAND]

Commands:
  clear   Clear cache, log
  check   Check application conditions
  export  Export subscribed feeds
  help    Print this message or the help of the given subcommand(s)

Options:
      --endpoint <ENDPOINT>                synd_api endpoint [env: SYND_ENDPOINT=] [default: https://api.syndicationd.ymgyt.io:6100]
      --log <LOG>                          Log file path [env: SYND_LOG=] [default: " /home/ymgyt/.local/share/synd/synd.log"]
      --theme <PALETTE>                    Color palette [env: SYND_THEME=] [default: slate] [possible values: slate, gray, zinc, neutral, stone, red, orange, amber,
                                           yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink]
      --timeout <TIMEOUT>                  Client timeout [default: 30s]
      --categories <CATEGORIES TOML PATH>  categories.toml path
  -h, --help                               Print help
  -V, --version                            Print version

Authentication

syndicationd maintains state (such as subscribed feeds) on the backend, and therefore requires authentication to make requests.
Currently, GitHub and Google are supported as authorize server/id provider. The only scope syndicationd requires is user:email(Github) or email(Google) to read the user's email. the user's email is used only as an identifier after being hashed and never stored.

Keymap

Click to show a keymap table
Key Description
k/j Move up/down
gg Go to first
ge Go to end
Tab Switch Tab
Enter Open entry/feed
a Add feed subscription(on Feeds Tab)
e Edit subscribed feed(on Feeds Tab)
d Delete subscribed feed(on Feeds Tab)
r Reload entries/feeds
h/l Change requirement filiter
c Activate category filiter(Esc to deactivate)
+ Activate all category(on Category filter)
- Deactivate all category(on Category filter)
q Quit app

for more details, refer to keymap/default.rs

Subscribe feed

To subscribe a feed, type "Tab" to move to Feeds tab and then press "a".
synd uses edit to launch the user's editor(like a git commit).
The feed to subscribe to should be entered in the format:
Requirement Category URL

When you close the editor, the subscription request is sent to the API.

Requirement

Requirement indicates the importance of the feed.
This uses an analogy to RFC2119 and can take one of the following values:

  • MUST: Most important, must be read.
  • SHOULD: Next in importance, should be read unless there is a special reason not to.
  • MAY: Lowest importance, may be read.

Category

Category represents the category of the feed. You can specify any value as a category. The values that synd recognizes as categories are defined in categories.toml. You can override the default values with the --categories flag.

Edit subscribed feed

To change the requirement or category of a feed you have already subscribed to, select the target feed in the Feeds tab and then press "e".

Unsubscribe feed

To unsubscribe from a feed, select the target feed and press "d".

Filter feeds/entries

Feeds and entries can be filtered as follows.

By requirement

To filter bases on the specified requirement, press "h/l(Left/Right)".
If you set the filter to MUST, only those marked as MUST will be displayed. Setting it to SHOULD will display feeds and entries marked as MUST and SHOULD. If set to MAY, all feeds and entries will be displayed.

By categories

To filter bases on categories, presess "c". This will display a label with keys to control the activation/deactivation of each category, allowing you to toggle the visibility of categories.
Pressing "-" will deactivate all categories, and pressing "+" will activate all categories.

You can exit the filter category mode by pressing the "Esc" key.
The icons for categories can be specified in categories.toml

Export subscribed feeds

To export subscribed feeds, execute the synd export command.
You can check the JSON schema of the data to be exported with synd export --print-schema

Click to show a export json schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Export",
  "type": "object",
  "required": [
    "feeds"
  ],
  "properties": {
    "feeds": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/ExportedFeed"
      }
    }
  },
  "definitions": {
    "ExportedFeed": {
      "type": "object",
      "required": [
        "url"
      ],
      "properties": {
        "title": {
          "type": [
            "string",
            "null"
          ]
        },
        "url": {
          "type": "string"
        }
      }
    }
  }
}

Log file

The log file path is based on ProjectDirs::data_dir().
Please refer to the --log flag in synd --help for the default output destination.

You can modify the log directives using the environment variable SYND_LOG. (for example, SYND_LOG=synd=debug)

Theme

The theme can be changed using the --theme flag. Please refer to the help for the values that can be specified.

Backend api

By default, synd use https://api.syndicationd.ymgyt.io as the backend api(hosted on my home Raspberry Pi).
To change the endpoint, specify the --endpoint flag

The hosted api is instrumented with OpenTelemetry. Basic signals(traces,metrics,logs) are published on the Grafana dashboard

Clear cache and logs

Authentication credentials are cached. to remove them, execute synd clear.

Check application status

synd check [--format (human|json)] return current application status.

synd check --format json | from json
╭───────┬─────────────────────────────────────────╮
       │ ╭─────────────┬────────────────────╮    │
 api   │ │ description │ health of synd-api │    │
       │ │ status      │ Pass               │    │
       │ │ version     │ 0.1.9              │    │
       │ ╰─────────────┴────────────────────╯    │
 cache │ /home/ferris/.cache/synd                │
 log   │ /home/ferris/.local/share/synd/synd.log │
╰───────┴─────────────────────────────────────────╯

License

This project is available under the terms of either the Apache 2.0 license or the MIT license.

Feed tips

Some tips about feed that I know.

  • You can retrieve various updates as feeds on GitHub.

    • To obtain releases of a repository, specify releases.atom. for example, to obtain releases of syndicationd, specify https://github.com/ymgyt/syndicationd/releases.atom
    • For tags, it's https://github.com/ymgyt/syndicationd/tag.atom
  • Adding .rss to the end of a Reddit URL allows you to retrieve the feed. for example, for https://www.reddit.com/r/HelixEditor/, it would be https://www.reddit.com/r/HelixEditor.rss

If you're looking for feeds, here are my recommendations.

For Rust users

Click to show a table
Feed URL
This Week in Rust https://this-week-in-rust.org/atom.xml
Rust Blog https://blog.rust-lang.org/feed.xml
Inside Rust Blog https://blog.rust-lang.org/inside-rust/feed.xml
RustSec Advisories https://rustsec.org/feed.xml
seanmonstar https://seanmonstar.com/rss
Mara's Blog https://blog.m-ou.se/index.xml
Without boats, dreams dry up https://without.boats/index.xml
fasterthanli.me https://fasterthanli.me/index.xml
Orhun's Blog https://blog.orhun.dev/rss.xml
axo blog https://blog.axo.dev/rss.xml
Kbzol's blog https://kobzol.github.io/feed.xml
baby steps https://smallcultfollowing.com/babysteps/
COCl2's blog home https://blog.cocl2.com/index.xml

For Nix users

Click to show a table
Feed URL
This Cute World https://thiscute.world/en/index.xml
Determinate Systems https://determinate.systems/rss.xml

For Observability

Click to show a table
Feed URL
observability news https://buttondown.email/o11y.news/rss
Opentelemetry blog https://opentelemetry.io/blog/2024/index.xml

For Kubernetes users

Click to show a table
Feed URL
Kubernetes Blog https://kubernetes.io/feed.xml
Kubernetes Official CVE https://kubernetes.io/docs/reference/issues-security/official-cve-feed/feed.xml
CNCF https://www.cncf.io/feed/

Misc

Click to show a table
Feed URL
Terminal Trove https://terminaltrove.com/blog.xml

Dependencies

~36–55MB
~1M SLoC