For some time I have been able to directly post things to this blog from my feed reader. My feed reading client is connected to a simple feed server, the Yarns WordPress plugin. Now I have connected my feed reading client to the API of the FreshRSS instance I use for feedreading daily.

The Yarns feeds server works, but it requires a WordPress install to run in and is somewhat limited. I could run it in this here WordPress, but then the many feeds I follow would pollute my blogs database. So until now I ran it in a separate WordPress install. All a bit hacky, and more proof of concept than really a smooth fit for my daily routines.

I do however daily use FreshRSS, which I run as a self-hosted instance on a VPS. FreshRSS has an API, or rather it has two API’s, meaning that I could run my feed reading client on top of FreshRSS by talking to its API.

FreshRSS has two APIs, one is the Fever API, the other is the Google Reader API of old. Both aren’t very well documentend w.r.t. their implementation in FreshRSS, because they assume you’d use it for a mobile client using a local database. I don’t want to replicate the database, I want to only directly talk to the API to fetch the things I need. After some experimentation in Postman I could talk to the Fever API, but haven’t worked out how to talk to the Google Reader API of FreshRSS.
The Fever API doesn’t support calling items by feeds and feeds by groups, the way I actually read in my ‘reading by social distance set-up‘. It can give me groups, feeds and items, but not cross-referenced. In terms of content it can basically only give me a bunch of feed items, at most limited by the item number of the oldest unread item. But it works. The previous post was created directly from my feed reading client, while fetching the item itself from FreshRSS.

Now, I need to figure out how to use the other API, so I can do more of the things that I want from my ideal RSS reader.

Houtje-touwtje, literally ‘small stick-short rope’, or cord loops fasteners in English, is the more down to earth and old Dutch phrase for putting stuff together with duct tape (known as MacGyver tape to many here, after the 80’s tv series). After messing around in the FreshRSS back-end last weekend, yesterday I made a houtje-touwtje working version to let me post more easily about the things I find in my feed reader.

In my previous post I mentioned I want to support three different reactions:

  • favourites, something I liked, or want to let the author know I appreciated
  • bookmarks, something I (want to) read, and keep reference to for my notes
  • replies, something where I comment on or reply to a posting and its author directly

Four labeled posts in my feed reader

The way I mark postings in my feed reader is attaching a label to them (favourite, bookmark, reply)
Then with the SQL statement from the last posting I pull out those labeled postings (label, url, title, author, and content).

Yesterday evening I attempted to bring it a step or two further, but ended up with something that works.
I created a php html page that shows me, using the SQL query, every labeled posting and for each posting shows a webform. That webform is needed because I want to be able to add two things to every labeled posting (though they’re not mandatory)

  • My motivation for favouriting, or bookmarking, or my reply
  • A quote of the bit in the original posting I am picking up on

The form for me to add motivation and selected quote

Next to that the form is needed to forward the other information (link, title, URL) to the next stage, along with my response and quote. This simultaneously allows me to clean up URLs, shorten the title or provide the actual author name if the post only contains a shortened username e.g.

The webform also contains a field for the total number of labeled items (hidden), and a field for the label itself. Again needed to forward them to the next stage of the process.

The second stage is that submitting the form, calls the same php page again, but this time to process the submitted form information (no longer the database query)

Based on the label (fav, bookmark or reply) it selects a template for how I want to show those in my blog (each have their own svg-icon and first sentence), uses the right microformat, and adds in the url, author, title and my reaction and selected quote in the right spots. The microformat is relevant for when my posting sends a webmention to the website I’m reacting to, and lets that site know if it’s a reply (to show underneath in their comments), or a bookmark or favourite. Assuming that the other website can receive webmentions that is.

Resulting HTML

The result of that is then shown to me in HTML. I paste that HTML into my blog editor, add things like posting categories and tags, and hit publish. In essence I’ve replaced what the Post Kinds plugin, that I stopped using, in my WordPress blog did before: automating fetching some info, and adding it into my posting. It is akin to what I had previously, where I weekly posted links to my blog from my Evernote bookmarks using e-mail.

The posting on the blog

This ‘houtje-touwtje‘ set-up doesn’t do the fancy things yet, like posting itself automatically to my blog through micropub (UPDATE January 2022 it now does!), or providing me this functionality within my FreshRSS reader’s interface. Also, after posting things, I need to manually delete the labels, so they don’t resurface the next time I run the php script.

Another path to explore is using the same or similar workflow to put labeled posts into my personal notes.

This morning I tested out the workflow, and I was pleased with the result. I loaded up the feed reader, and did my usual reading. I marked things for follow up. I ran the script, added my motivation and selected quotes. Pasted the resulting HTML into my blog, added categories and hit publish. This definitely feels smoother and less time consuming. It’s been a while I posted more than 1 thing based on my feedreading that day, let alone four (1, 2, 3, 4) within minutes of reading it. The ‘normal’ routine was ending up with a bunch of open tabs in my browser, and at the end of the day giving up and hitting close-all for those I didn’t get around to during the day.

[Update: the php script is available in my GitHub account]

I have been using FreshRSS for a while as reader. I am interested in adding additional functionality to it. E.g. pushing entries from my reader to my clippings in Obsidian, or like Peter does, being able to push the things I favourite to my blog. Basically I am after the ‘social reader‘, where I respond to things and collect things directly from my reader. However I’m nowhere near capable enough to roll my own stuff building on existing IndieWeb tools. For now I’m therefore trying to add a few simple things on top of the reader I already use.

However it turned out, my FreshRSS set-up on a domain I have didn’t even have all functionality working properly. For instance starring an item results in a call to a URL that runs afoul of the filtering rules of my hoster. It gets blocked.
My feed reading is always ever on my main device, meaning I don’t really need to have it on an external webserver. Today I created a local install on my laptop, using the laptop’s (MAMP) webserver. Now everything works, and as a bonus I have direct access to the database behind FreshRSS which means I can do things as Peter describes in his posting linked above, run local queries on the database.

I should also try again to get Aperture running locally once more. That somehow never really worked out yet. The upside of Aperture is that it can parse not just existing RSS feeds but also other things as feeds.


My FreshRSS instance on localhost

As I’ve run into trouble with my TinyTinyRSS install, I’m switching to FreshRSS, to see how that works for me.

My TinyTinyRSS has the issue where many calls to the file backend.php keep timing out. It seems to have as effect that feed updates are not coming through, and worse that the repeated resource use flagged something with my hoster, making them blocking my home IP. That’s a blunt instrument to wield without checking whether that IP is your client’s own IP, but still.

Next to TinyTinyRSS my hoster also supports FreshRSS for self-hosting, so I installed that. I wanted to try FreshRSS out anyway, so this is a good opportunity to make the switch.