Reading RSS feeds at the Command Line with Newsboat
It's been seven years since Google pulled the plug on Google Reader. Seven. Years. And, believe it or not, there are people who are still whining about that. Some of them even say that by sending Reader to the digital glue factory, Google killed RSS.
Those people need to shut up.
RSS isn't dead. Far from it. RSS is still a great way for you to take control of the information you ingest from the online world. You choose what you want to read, not an algorithm.
All you need is a good RSS reader. If you want to go back to basics with your RSS reader, a solid option is Newsboat. It's a command line feed reader, forked from the venerable Newsbeuter, that's easy to use but packs a good number of features.
Let's take a look at how to use it.
First off, you'll need to install Newsboat. You can do that using your Linux distribution's package manager. Or, if that's your thing, you can compile the source code. Take you pick. I'll wait for you ...
Now that you have the software installed, you're going to need some RSS feeds to read. You might already be using an RSS reader but either want to move to Newsboat or use both readers in parallel. In that that case, export your feeds to an OPML file. Check the help for your reader to learn how to do that. Then, open a terminal window and type this command:
newsboat -i feed_export.xml
Where feed_export.xml is the name of the OPML file.
So what if this is your first kick at the RSS can or it's been a while since you've used an RSS reader? Chances are you don't have one of those files handy.
Not to worry. You just need to do some copying and pasting. Go to the folder .newsboat in your /home directory. Once you're there, open the file urls in a text editor. Then, go to the websites you want to read, find the links to their RSS feeds, and copy and paste them into the urls file.
When you fire up Newsboat for the first time, there are no items in your feeds. That's expected. You need to refresh those feeds to pull down the latest and greatest.
Do that by pressing r (to refresh the feed you're on) or R (to refresh all feeds) on your keyboard. To read the articles from a feed, press Enter to open that feed and scroll down the list. Then, press Enter to read an item.
Return to the list of articles by pressing q. Press q again to return to your list of feeds.
Every so often, you might run into a feed that shows just part of an article. That can be annoying. To get the full article, press o to open it in your desktop's default web browser. On my desktop, for example, that's Firefox. You can change the browser Newsboat works with. I'll explain how to do that in a moment.
Hyperlinking has been a staple of the web since its beginnings at CERN in the early 1990s. It's hard to find an article published online that doesn't contain at least a couple of links that point elsewhere.
Instead of leaving links embedded in an article or post, Newsboat gathers them into a numbered list at the end of the article or post.
To follow a link, press the number beside it. If you were reading the article in the image above, you'd press 4 to open the link to the homepage of one of the contributors to that article.
Using Newsboat with Online Feed Readers
You might use a web-based feed reader, but might also want to read your RSS feeds in something a bit more minimal on your desktop. Newsboat can do that.
It works with several feed readers, including The Old Reader, Inoreader, Newsblur, Tiny Tiny RSS, FeedHQ, and the news reader apps for ownCloud and Nextcloud. Before you can read feeds from any of them, you'll need to do a little setup work.
Go back to the .newsboat folder in your /home directory and create a file named config. Then add the settings that hook Newsboat into one of the RSS readers it supports. You can find more information about the specific settings for each reader in Newsboat's documentation.
Here's an example of the settings I use to connect Newsboat with the news reader app in my instance of Nextcloud:
I've tested this with Nextcloud, The Old Reader, Inoreader, and Newsblur. Newsboat worked seamlessly with all of them.
Some Useful Configuration Tricks
You can really unleash Newsboat's power and flexibility by tapping into its configuration options. That includes changing text colors, modifying the order in which Newsboat sorts feeds, where it saves articles, the length of time Newsboat keeps articles, and more.
Below are a few of the options I've added to my configuration file.
Change Newsboat's Default Browser
As I mentioned a few paragraphs ago, Newsboat opens articles in your default graphical web browser. To read feeds in a text-only browser like w3m or ELinks, add this to your Newsboat configuration file:
browser "/path/to/browser %u"
In my configuration file, I've set w3m up as my browser:
browser "/usr/bin/w3m %u"
Automatically Remove Articles You've Read
I like an uncluttered RSS feed. That means getting rid of articles I've already read. Add this setting to the configuration file to have Newsboat do that automatically:
Refresh Your Feeds When You Start Newsboat
Life gets busy. Sometimes, I go a day or two without checking my RSS feeds. That means having to refresh them after I fire Newsboat up.
Sure, I can press r or R, but why not have the application do it for me? I've added this setting to my configuration file to have Newsboat refresh all of my feeds when I launch it:
If you have a lot of feeds, it can take a while to refresh them. I have around 80 feeds, and it takes over a minute to get new content from all of them.
Is That It?
Not even close. In addition to all of its configuration options, Newsboat also has a number of command-line switches you can use when you fire it up. Read more about them in the documentation.
On the surface, Newsboat is simple. But a lot of power and flexibility hides under its hood. That makes Newsboat an excellent RSS reader for anyone who needs a basic set of features or for someone who needs their RSS reader to do a whole lot more.