RSS with Newsboat

The 2013 announcement that Google Reader would no longer be available prompted many of its users to look for alternative RSS reader applications. There are plenty of other web-based and GUI options, but text user interface enthusiasts (and Arabesque readers) may find Newsboat, formerly Newsbeuter, worth a look in particular.

Newsboat refers to itself as “the Mutt of RSS readers”, alluding to its keystroke-driven ncurses(3) interface, plaintext configuration with many options, and extensive feature set. If you like the idea of using a client-side RSS reader in a terminal, then this may be ideal for you.

Having a client-side reader is particularly valuable if you follow feeds which aren’t available on the public internet, or if you would prefer to keep your subscriptions relatively private. It’s also handy to have a local cache of feed items to search, which is a feature of Newsboat.

Installing Newsboat

Newsboat can be downloaded and built from source. At the time of writing (December 2017), it may not yet be available in your operating system’s package manager, though its unmaintained predecessor Newsbeuter may be.

Newsboat will throw an error if you try to start it with no feeds defined. We’ll be fixing that shortly.

Managing feeds

Adding, removing, and tagging feeds is all done with the urls file. This might be saved in either ~/.config/newsboat/urls, or ~/.newsboat/urls. Either way, you can edit it directly within the program using E, which will start your $EDITOR to manage the URLs. Add and remove feed URLs, save the file, quit, and you’re done; Newsboat will reload its defined feeds automatically once the editor is closed. The titles of your feeds will appear, along with a count of their unread items.

Some useful keystrokes

From here, the basics are pretty intuitive; you can move around with the cursor keys, and select feeds and items within them with Enter. You can press q to move up a screen, and to quit the program; Q will quit unconditionally from any screen.

You can move to next and previous feed items with J and K. A nice quick way to read everything is to cycle through unread items across all feeds with n. You can save the complete text of an article with s, and search for articles matching a string (not a regular expression) with /.

You can press o to open the feed’s URL in a browser; this works fine if you’re using an X server, but you can also configure this to be a command-line browser like lynx if you’d prefer with the browser option in the configuration file. If you’re using PuTTY and you’re going to be copy-pasting URLs from your terminal window, it helps to make sure you’ve configured it to easily select URLs on double-click.

A complete list of all the keystrokes is available by pressing ?.

Tags

If you imported your feeds from another system, and you were using folders to keep your feeds organised, you may note that in your urls file in Newsboat the names of the folders are included in quotes at the end of each line:

https://debian-administration.org/atom.xml "Tech"
https://www.jerkcity.com/jc.rss "Comics"
https://www.kiwiblog.co.nz/feed "Politics"

These are tags, Newsboat’s way of organising feeds non-hierarchically. If you have such tags defined, you can limit your view of feeds to a particular tag by pressing t to show only those matching feeds. You can press Ctrl-t to back out of that view and show all feeds again.

Creating a new tag is done by editing the urls file as above. Add the tag in quotes after the appropriate feed URLs. Note that you can have more than one tag for each URL:

https://www.debian-administration.org/atom.xml "Tech" "Debian"

Configuration

The Newsboat configuration file might be in either ~/.config/newsboat/config or ~/.newsboat/config. The following options might be useful:

  • auto-reload yes — Check all feeds for new items on startup, and periodically thereafter.
  • reload-time 30 — Re-check all feeds automatically every 30 minutes.
  • notify-beep yes — Send a console beep every time new items are found. You will probably only want this if you are dealing sensibly with bells, for example with a visual bell system in GNU Screen or tmux, otherwise you may find an audible bell annoying.
  • confirm-exit yes — Prompt before quitting. Tapping q to get to the top screen is a little error-prone, and it’s easy to quit accidentally.

The colorscheme for the application can also be customized here, and the keybindings too. See the Newsboat documentation for a complete list of configuration options.

Special feeds

If you can’t directly retrieve your feed from a URL, but need to generate it programatically from a script or use a tool like curl to retrieve it, you can use special exec: URLs in the urls file to manage this. For example, to retrieve an RSS feed of my work’s network changelist, I do something like this:

"exec:ssh work curl http://changelog.worknet/rss.xml"

This retrieves the feed using curl(1) over ssh(1), and presents it as a normal feed in Newsboat. Note the quotes are required for any command that includes spaces.

I’ve found Newsboat a great tool, and it fits very nicely as a permanent window in my tmux(1) session. Hopefully you’ll find it suits you too, and works well with your terminal-based workflow.

This post was edited in December 2017 to direct users to the maintained fork of the abandoned Newsbeuter software, and to put the demise of Google Reader firmly into the past tense, as the migration tools it offered temporarily are long-gone.