I am working on following somewhat in Peter’s footsteps. He has his FreshRSS reader connected to his weblog, for everything he ‘stars’ in his feed reader. Those get posted to his ‘favourites’ stream, and send webmentions so they end up as ‘likes’ underneath the original posts. See Peter’s description on his blog.

My plans are a bit more ambitious, an ambition that may yet well bump into the limtis of my php / mysql capabilities.

I want to be able to mark articles in the feed reader for three things: bookmarking, favouriting, and replies. Then I want to add two pieces of content, and post that to my site.

When I favourite something on my blog, I basically always add 2 things when posting it: a rationale for why I like something, and a quote from the original article that meant something to me. See the image below, a screenshot of a ‘favourite’ I marked earlier this month.

That post is made of a short template that I now activate when in my blog’s editor with a hotkey (using AlfredApp) that creates the star, and has a place for the URL, title and author, plus my own motivation for posting, and a quote with the author’s name repeated.
Favourites, bookmarks and replies follow the same template. The only difference is the symbol shown, and the microformat used to signal to the original article what sort of webmention I’m sending their way (so they know how to treat it, e.g. as a like or as a comment/reply)

Peter’s example of favouriting by starring leads to setting a boolean field in the content table itself of the database.
FreshRSS lacks three distinct ‘starring’ buttons, but I can easily add labels to a posting. Those labels are stored in a separate table from the feed articles, unlike when starring.

The first step to take then is to gain access to the postings I mark for follow-up during feed reading. I’ve used the following SQL query:

SELECT ton_entry.link, ton_entry.author, ton_entry.title, ton_entrytag.id_tag, uncompress(ton_entry.content_bin) as content FROM ton_entry JOIN ton_entrytag ON ton_entry.id=ton_entrytag.id_entry

The two key differences with Peter’s SQL statement are, the JOIN part, and the uncompress part. The JOIN statement combines the table that knows what labels I applied with the table that contains all articles, and selects only those where an article ID is in both tables, resulting in a list of the articles I applied labels to. Because in a later step I want to select a quote from the source article the SQL statement also grabs the content of an article. That content is stored as a compressed binary blob (yes, blob is its official name) in the database. Using ‘uncompress’ makes the content blob human readable again, and the ‘as content’ bit puts it in a variable called content.

The next step is allowing me to provide my remarks and select a quote through a form, and the third step to add all that in to the right template based on the label (favourite, bookmark, reply), after which I need to put it into my WordPress install in the right categories and publish it.

As a first step to better understand the different layers of adding microformats to my site (what is currently done by the theme, what by plugins etc.), I decided to start with: what is supposed to go where?

I made a post-it map on my wall to create an overview for myself. The map corresponds to the front page of my blog.

Green is content, pink is h- elements, blue u- elements, and yellow p- elements, with the little square ones covering dt- and rel’s. All this is based on the information provided on the http://microformats.org/wiki/Main_Page, and not on what my site actually does. So next step is a comparison of what I expect to be there from this map, to what is actually there. This map is also a useful step to see how to add microformats to the u-design theme for myself.

Earlier this week I discussed microformats with Elmine. Microformats make your website machine readable, allowing other computers and applications to e.g. find out where my contact information is, and the metadata from my postings.

It was a discussion that branched off a conversation on online representation and marketing. I currently use the Sempress theme on this blog as it does microformats pretty well as far as I can tell, but it doesn’t look all that nice. Previously I had used the microformats plugin in a regular theme, but that didn’t work really well (the plugin is not at fault, it’s a best effort)

Ideally I’d like to add microformats to other sites I use, not just this blog. That means I’d like to add it to a generic theme like U-design. As I think it would be less effort to add microformats to U-design, than make Sempress look better and more generic for my sites. Elmine approached the creators of U-design, but microformats are not on their list of priorities. They do already support schema.org out of the box.

The steps I think I need to make:

  • Map-out visually where I want to use which microformats where and how. [UPDATE: done]
  • Then take a much closer look at the code of the existing Microformats plugin as well as the functions.php file of the Sempress theme
  • to see how the first hooks into existing themes, and how the second shapes the microformats to be added to the html of the page.
  • Determine if one or the other is usable with U-design as is, or alternatively which parts to re-use / adapt

How does this work?

I posted those words just now from my phone using swentel‘s micropublishing app Indigenous for Android. I had tried that before, but I thought it could not use categories. That’s is a key functionality, as I use it to keep postings like these from the front page. This morning I learned during a session on micropublishing that what the micropub client sends is not determining anything on the micropub server side. It just sends the posting and then lets the other end decide what it does with it. I also learned that in microformats categories and tags are the same thing.

It made me realise that where micropub apps talk about categories and tags it doesn’t mean anything about how this WordPress install deals with that. So I tried adding the category name I want in WordPress as a tag to see how this site deals with that. Turns out it works, if you use the internal name of the category in WordPress. So for this posting to end up in the Day to Day category I used the internal name I gave it, which is ‘timeline’, as a tag.

I plan to dedicate some learning time in the coming 12 weeks to better understand the protocols that drive the independent web, or IndieWeb. During our STM18 birthday unconference Frank Meeuwsen presented his experiences on the IndieWeb. Frank, Peter and I have formed an impromptu triade to explore the IndieWeb in the past months. In one of his slides Frank conveniently listed the relevant protocols. I’ll plan for 24 hours to explore 6 protocols. Some of them I already understand better than others, so I’ll start with the ones I feel less knowledgeable about.

The ones I want to explore in more detail, in planned order, are:

  • ActivityPub / OStatus, a decentralized networking protocol (as this ties into my Mastodon experiments as well, this comes first)
  • Micropub, publish on your own domain with 3rd party tools
  • Microsub, own your feed-subscriptions (although I already run my own TinyTinyRss instance)
  • Microformats, markup for data, text, people, events (already used on my blog, but curious to see how I can extend that to more types of data)
  • Indieauth, federated login protocol to sign in with your own domain on other services (already active on my blog, but interested in where else I could use it)
  • Webmentions, respond to a blogpost through your own site (already active on my site, but strongly wish to better format and style it on my site)

I switched the theme of my site to SemPress. It’s a theme that is created to properly support microformats. So I could switch off the Microformats 2 plugin that attempts to do the same as a ‘best effort’ inside other themes. This theme is by the same coder(s) as the plugin. Hopefully this fixes the microformat errors on my side. Next step is looking at the way I display webmentions.