Daily Notes for 2024-01-26

ยท 327 words ยท 2 minute read

Sorta the mutt of RSS readers ๐Ÿ”—

Newsboat is pretty cool! It’s a plaintext RSS reader that has strong affinities for mutt in look and configuration.

Like mutt, it might not crowd out everything else in the toolbox but it can help you burn through the subscription list and triage even if you have more comfortable ways of reading the content you process.

It also has built-in filtering. If you’re using an RSS provider that already does that, e.g. FreshRSS or Feedly, that might not be super valuable, but it’s easy to make a killfile either way:

ignore-mode display
ignore-article "*" "link =~ \"/ducks/\""
ignore-article "*" "link =~ \"/advice/\""
ignore-article "*" "link =~ \"/nfl/\""
ignore-article "*" "link =~ \"/beavers/\""
ignore-article "*" "link =~ \"/blazers/\""
ignore-article "*" "link =~ \"/highschoolsports/\""
ignore-article "*" "link =~ \"/entertainment/\""
ignore-article "*" "link =~ \"/realestate-news/\""
ignore-article "*" "link =~ \"/food/\""
ignore-article "*" "link =~ \"/hawks/\""

Scripting the Linkding API to make a bookmark function for Newsboat ๐Ÿ”—

If you like reading longform plaintext maybe Newsboat is all you need. I tend to treat RSS as a two-step process: See an interesting thing, send it to some sort of RIL or bookmarking service. Newsboat has a bookmarking function you can customize with your own scripts. It just passes the article URL, title, description, and website description to your script, which has to talk to whatever API. There are a bunch of examples in the Newsboat contrib directory for things like Pocket, Pinboard, and Evernote. No Linkding, but the Linkding API is simple enough.

Could be simpler but I bounced off of net:http in my formative years:

#!/usr/bin/env ruby

require 'httparty'
require 'json'

linkding_uri = "https://links.puddingtime.net/api/bookmarks/"

# Get your Linkding API key from Settings > Integrations

token = ENV['LINKDING']

link_url = ARGV[0]
link_title = ARGV[1]
description = ARGV[2]
website_title = ARGV[3]

params = {url: URI(link_url), title: link_title, website_title: website_title, unread: true}
headers = {'Content-Type' => "application/json", 'Authorization' => "Token #{token}"}

resp = HTTParty.post(linkding_uri, body: params.to_json, headers: headers)