Skip to content

orhun/syndicationd

 
 

Repository files navigation

Syndicationd

CI Release

Demo

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

Website

Features

  • Subscribe feeds(RSS1, RSS2, Atom,...) and browse latest entries
  • Open the entry in a browser

Install

nix

nix profile install github:ymgyt/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.1.10/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.1.10/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]
  -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. 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)
d Delete subscribed feed(on Feeds Tab)
r Reload entries/feeds
q Quit app

for more details, refer to keymap/default.rs

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, 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.5              │    │
│       │ ╰─────────────┴────────────────────╯    │
│ 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.

Packages

No packages published

Languages

  • Rust 96.4%
  • Just 1.8%
  • Nix 1.8%