Feb. 9 — Managing my RSS feeds in 9front
After getting by for the most part with only the most basic 9front cpu server setup, I recently decided to start exploring the different capabilities of auth-specific systems like secstore(1)
and cron(8)
. Article on secstore
to come, but in the meantime I figured I would write about what I've learned regarding using 9front's cron
system to schedule basic tasks.
In my search to transfer even more of my day-to-day computing tasks over to my 9front machine, I realized that there was one key piece of software that I was still missing: an RSS feed reader of some kind. In the search for options, rrss
¹ and rssfill
² came up repeatedly while searching.
While rrss
looked to be very slick and robust with its full browser-based feed, I didn't really need all of the bells and whistles for the time being. I instead went with the rssfill
approach, mostly because it seemed like it could be easily reproduced without much fuss and involved using the built-in functionality of the news(1)
program. It also is written in C as opposed to Go, which can be nice if one doesn't wish to install an entire extra language on their machine – not a jab at Go, of course; I love Go.
Once I had downloaded and compiled the program, I looked at the provided example script for fetching feeds. It was perfectly suitable, but I wanted to split things up a bit and have a separate list of feeds that would be easier to edit in the future. I cobbled together my own little newsup
³ script in a minute or two and went about setting up cron
.
The cron daemon (auth/cron
) needs to be run on an auth server. My current testbed system is a Thinkpad T420 running as a combination auth+cpu+fs server, so it was as simple as adding the following to the file /cfg/$sysname/cpurc
:
auth/cron >>/sys/log/cron >[2=1] &
and rebooting. This was followed by running auth/cron -c
to create the appropriate file for my user in /cron/$user/cron
and opening trusty ol' sam
to add another single line:
1 1,3,5,7,9,11,13,15,17,19,21,23 * * * local cron/newsup
This will run my newsup
script every two hours, every day. The local
bit runs the specified command on – you guessed it – the local machine as opposed to an alternate known host, which is another great example of the flexibility found throughout Plan 9. After placing newsup
into a new $home/bin/rc/cron
directory and writing out my feedlist as $home/lib/feeds
⁴, I waited a few minutes and then ran news
. It worked first try – a nice list of articles and git
commits to browse along with the joy of knowing that I can now ditch yet another aspect of my non-9 computing.