"Nature and human life are as various as our several constitutions. Who shall say what prospect life offers to another? Could a greater miracle take place than for us to look through each other's eyes for an instant?" — Henry David Thoreau
For a few years now, it has been a goal (or more of a dream) to build my own feed reader which integrates directly with the blog making it easy to perform indieweb actions such as likes and replies. I started building a WordPress plugin back in 2018 but quickly abandoned it as I didn't have the coding skills necessary at the time.
Today I am officially unveiling /reader, my new indie, integrated feed reader.
Before getting to the details I wanted to say that this has been made possible thanks to this RSS & Atom parser by David Grudl, it took a lot of the grunt work out of the equation meaning I could focus on the important bits.
Down to business
Reader adopts the visual style from the blog and my notes page displaying items as 'cards' in a river of news — oldest first. It can show all items, per feed or the last 24 hours.
New feeds can be added individually or imported from an (uploaded) OPML file. When added, the posts for that feed will be automatically pulled in. A cron job polls for new items every 30 minutes checking the last time the feed was updated to see if it needs to grab new items. That date is then written to the database for the next time it checks.
I'm currently storing a rolling three months of items but may reduce this to keep the table size down. When polling for posts it compares the timestamp (e.g. pubDate or updated) against 'now minus three months' and ignores anything older. New items are pulled into the database and those older than three months are deleted.
I can trigger a manual update at any time via a 'refresh' icon which triggers an async action to poll feeds in the background. The feed list (which slides out from the left) shows which feeds have unread items.
Indie and Integrated
So, why go to all the trouble of building my own feed reader? The main reason is integration with the blog. It's also another aspect of my online life that I can bring into my own control.
In addition to 'mark as read' each 'card' has actions which allow me to post directly to the blog and send webmentions. I can like, reply to or bookmark a post and the relevant Webmention will be sent.
Tapping each of these actions brings up a form populated with the post URL and the 'content filter' to add the required markup. I can then add some comments or my reply and post that straight to the blog.
I can 'mark all as read' which does as it suggests unless viewing a single feed when only items for that feed are marked.
The /reader page is publicly available but all admin and post actions are gated behind login checks. Anyone is welcome to come and have a look at what feeds are listed — the posts visible will reflect my read/unread status.
I am considering adding the ability for anyone to download an OPML export of the feeds list should they want. I might also add an option to 'suggest a feed' where visitors can let me know of a site they think I should be subscribed to.
This is a version 1.0 feature that likely has bugs and needs tidying up or refining so it will likely change as I use it more and come up against issues or frustrations. I've already thought of one thing I want to add while typing this.
It doesn't support JSON feed but someone submitted a PR to include this in the library so I may look at implementing that in future.
Oliver Burkeman quoting Julio Vincent Gambuto in Four Thousand Weeks:
"… [but] I beg of you: take a deep breath, ignore the deafening noise, and think deeply about what you want to put back into your life. This is our chance to define a new version of normal, a rare and truly sacred (yes, sacred) opportunity to get rid of the bullshit and to only bring back what works for us, what makes our lives richer, what makes our kids happier, what makes us truly proud."
So much this. Exactly what I've been saying: simply returning to normal, the old normal, is to miss a trick.
Yes, we long for normality but the past two years have shown us other possibilities, proven that what we considered 1 "the only way" is, indeed, not.