Harry R. Schwartz

Software engineer, nominal scientist, gentleman of the internet. Member, ←Hotline Webring→.

bearded cartoon drawing of the author · 1B41 8F2C 23DE DD9C 807E A74F 841B 3DAE 25AE 721B

Sending Newsbeuter/Newsboat Articles to Instapaper

Published 08 May 2018. Tags: beards, web.

I read RSS feeds through newsboat (the regularly maintained successor to newsbeuter). I also often save articles to read later through Instapaper. I wanted to be able to save articles from newsboat directly to Instapaper by just hitting a key.

Neither newsbeuter nor newsboat seem to support binding arbitrary keys to arbitrary commands, so the idea here is to rebind the “bookmark” command to hit a shell script that sends the article to Instapaper.

There’s a Ruby library/executable called ricepaper that you can use to interface with Instapaper. Assuming you’ve got Ruby installed, you can install the library with:

$ gem install ricepaper

Next, you’ll need to wrap it with an executable that takes a URL as a command line argument and handles your Instapaper credentials. Save this script as instapaper, set the username and password variables appropriately, drop it somewhere in your $PATH, and make it executable:


# Add a URL to Instapaper.
# Usage:
# $ instapaper <url>


ricepaper -u $username -p $password "$1" > /dev/null &

You should now be able to run the instapaper script successfully, with the indicated article appearing in your Instapaper account:

$ instapaper <url_for_an_article>

Assuming that works, you can bind the key in your ~/.newsboat/config:

bookmark-cmd instapaper
bookmark-autopilot yes
bind-key i bookmark

Restart your feed reader, navigate to an article, hit i, and your article should appear in Instapaper.