Sfeed_curses: a curses UI front-end for sfeed

Last modification on

sfeed_curses is a curses UI front-end for sfeed.

It shows the TAB-separated feed items in a graphical command-line UI. The interface has a look inspired by the mutt mail client. It has a sidebar panel for the feeds, a panel with a listing of the items and a small statusbar for the selected item/url. Some functions like searching and scrolling are integrated in the interface itself.

Features

  • Relatively few LOC, about 1600 lines of C at the moment.
  • Few dependencies: a C compiler and a curses library (typically ncurses). It also requires a terminal (emulator) supporting UTF-8.
  • Easy to customize by modifying the small source-code and shellscripts.
  • Quite fast.
  • Plumb support: open url directly with any program.
  • Pipe support: pipe the selected Tab-Separated Value line to a program for scripting purposes. Like viewing content in any way you like. An example script is included.
  • Familiar keybinds: support both vi-like, emacs-like and arrow keys for actions.
  • Mouse support: xterm mouse-mode, if supported by the terminal emulator.

Cons

  • No support for marking items as read/unread: this is a feature to me, because I don't like micromanaging this. Feed items with a timestamp of yesterday and newer are automatically marked as bold.

Like the format programs included in sfeed you can run it like this:

sfeed_curses ~/.sfeed/feeds/*

... or by reading from stdin:

sfeed_curses < ~/.sfeed/feeds/xkcd

It will show a sidebar if one or more files are specified as parameters. It will not show the sidebar when reading from stdin.

Screenshot showing what the UI looks

On pressing the 'o' or ENTER keybind it will open the link url of an item with the plumb program. On pressing the 'a', 'e' or '@' keybind it will open the enclosure url (if there is one). The default plumb program is set to "xdg-open", but can be modified by setting the environment variable $SFEED_PLUMB. The plumb program receives the url as a command-line argument.

The TAB-Separated-Value line of the current selected item in the feed file can be piped to a program by pressing the 'c', 'p' or '|' keybind. This allows much flexibility to make a content formatter or write other custom actions or views. This line is in the exact same format as described in the sfeed(5) man page. The pipe program can be changed by setting the environment variable $SFEED_PIPER.

Screenshot showing the output of the pipe content script

The above screenshot shows the included example shellscript which uses the lynx text-browser to convert HTML to plain-text: content.example.sh. It pipes the formatted plain-text to the pager "less". Of course the script can be easily changed to use a different browser like w3m, links or dillo or webdump.

Clone

git clone git://git.codemadness.org/sfeed_curses

Download releases

Releases are available at: https://codemadness.org/releases/sfeed_curses/.

Build and install

$ make
# make install