Today I posted a bookmark directly to this blog, straight from a feed reader I created myself. A few days ago I already posted about how I am building a Microsub client, which basically is the front-end of a feed reader: it’s the part where you actually read the content from the RSS feeds you subscribe to. It does not in itself subscribe to any feeds, or store what it gets from those feeds. That’s the Microsub server, and I use an existing WordPress plugin called Yarns for it. By splitting the server (subscribing, fetching and storing) from the client (presenting), making the feed reader becomes building a website that can show me whatever is stored in the server. It makes it possible to shape my feed reader the way I want it. I had the basic fetching and presenting part done earlier this week. The next step was interacting with the things I read from within the reader, having a reply button underneath each posting, with which I can post to this blog. I’ve got that part working now too. To build it I re-used things I previously already created. For instance I already had a form, to formulate a response (originally stuck on the back-end of another feedreader), and a way of posting directly to this site. So adding this was more a remix than coding something new. The only new additions were the ‘glue’ needed to join the existing parts together, and a bit of Javascript to be able to process the form in the browser, while staying on the same page as where I’m reading feeds. And it works!
Here’s a posting by Peter, as presented in my feed reader:
Note the button underneath which says in Dutch ‘respond to the post above’. Each posting has a button like that.
Clicking such a button reveals a form (which is at first hidden, and revealed by a line of Javascript).
In the form I specify what type of response it is (reply, bookmark, or favourite), and I write my reaction, and can add a quote from the article above which is useful if I’m responding to something specific, and provides context for readers on my own site who aren’t aware of the posting I’m responding to. It also allows me to change the title, author name and URL of the original post. This sometimes is useful when the title is very long, the name in the feed is a user name (e.g. ‘siteadmin’), or when the URL contains appended tracking elements that I want to remove.
Underneath is another button saying ‘Process’ in Dutch.
Hitting that button activates a little bit of Javascript to call the PHP script that processes the form, without leaving the page. It means that once I’ve clicked the button I can go on reading in the same page. The script that silently processes the form, turns what I’ve submitted into proper HTML for a posting, and then sends it on to my blog. Where it ends up as:
On my blog you get to see what the processing script has created, including e.g. the icon for a bookmark (or reply or favourite).
I’m pleased with how this works now, and I can start adding a few things. Like adding optional titles to a reaction (as I’ve done in this posting), or to add multiple tags or categories. For these too I have existing code sections I can re-use. Another element is being able to subcribe, unsubscribe and mark things as read from within the Microsub client.
After that it will become more difficult, if I want to work down my list of things an ideal feed reader should be capable of.
Part of that may require storing feed items client side, or maybe even also building my own Microsub server. So it’s a potential rabbithole I want to approach with caution. For now I will try this as my new workflow for a week or two.
@ton Ha, I once did the same thing. In fact, it’s still up at https://reader.boddez.net/. (Kind of similar to Monocle, but [hopefully] more accessible/keyboard-friendly and more consistently styled. I’ve since abandoned work on it in favor of my more old-fashioned feed reader.)
Reader
@ton (How do you like Yarns? I find it quite limited … Doesn’t provide a whole lot of metadata, if I recall correctly. [Also not a fan of its inner workings, but that’s whole other discussion.])
@ton Almost forgot, but I once made an OPML importer for it. Feel free to test! https://github.com/janboddez/add-opml-to-yarns
GitHub – janboddez/add-opml-to-yarns: Add limited OPML support to the Yarns Microsub server
@jan agreed, I find Yarns very clunky. But for now that’s ok. Once I get to the things I’m actually after, that will be problematic. (I run yarns in its own WP instance to not have it clutter my own site’s dbase)
@jan oh that might come in handy. thanks.
@jan that’s a plugin, right?
@ton Yes. You kind of have to manually install it, though. Download the ZIP file and install that. For it to work, Yarns has to be installed, too (but it *shouldn’t* break anything if it isn’t).
@jan no prob, I’ll try it out. As it’s a separate WP instance, it can’t break anything anyway.