I’m pleased with how little friction I now feel to automatically publish my responses to what people send to my feed reader, using my newly home cooked Micropub client. This morning firing up the feed reader, writing and publishing responses felt very smooth. I’ll need to add some draft saving elements I think, because when responses become longer the risk of losing text in the local edit window rises.

In reply to My Personal Micropub Client’s Potential Use Cases by Ton Zijlstra

The four use cases I listed earlier contain two that don’t require anything new I soon realised. Both adding the Micropub logic at the back-end of my previous work to create replies etc. straight form my FreshRSS feedreader, and adding it to a basic form, only require one thing: adding the script that handles the posting to them, by way of an include.

Meaning this reply is generated the way I made possible earlier, and immediately posted now as well. And meaning I now also have a local webform that allows me to quickly jot something down and hit publish.

The other two cases mentioned (moving towards a microsub server and reader, and posting directly from my local markdown text files) do require new logic to be created, which takes more steps. Posting from my own notes is the one I will pick up now first, starting from the work I already did on publishing booklists. There I already have created building blocks that grab the content of my notes and turn them into something for the web.

What such personal and narrow bandwith use cases do I currently see?

  • Add it at the back of hacky script to post things from my FreshRSS reader, so it can post automatically and smoothly
  • Use it to post to this site, while reading feeds using YARNS in another WP instance for which a different access token is used.
  • Have a basic local webform I can fill out and hit publish on.
  • Be able to post directly from one of my notes in Obsidian, meaning I would be able to both write material to post there, or hit publish on an existing note.
  • Ton Zijlstra

    In my attempts to create a personal micropub client, I bumped into the oddity that my script posted correctly unless there was a SVG within the post. I use SVG icons regularly in replies (example), bookmarks etc. The feedback I received from others, such as on the issue I filed, tends to always point to trying the same thing with JSON. Though supporting JSON is optional in the Micropub standard, it is supported by the Micropub endpoint in my WordPress site.

    Today, I rewrote my basic php script to talk to the Micropub endpoint, and made it submit JSON formatted data. I could not get it to work with curl, which would be the suggested route, but it does work with file_get_contents that also worked earlier without JSON. And now, using JSON, it also works with SVGs in the postings.
    While changing tactics doesn’t provide an explanation of why the other route failed, it does allow me to move forward. A working Micropub client is what I now have, so next up is personalising it for my own use cases.

    Now that I have a very basic but working Micropub client, I can start shaping it as a personal and what I call narrow bandwith tool.

    What such personal and narrow bandwith use cases do I currently see?

    • Add it at the back of hacky script to post things from my FreshRSS reader, so it can post automatically and smoothly
    • Use it to post to this site, while reading feeds using YARNS in another WP instance for which a different access token is used. I probably should write this up in a bit more detail to explain the reasons for it
    • Have a basic local webform I can fill out and hit publish on.
    • Be able to post directly from one of my notes in Obsidian, meaning I would be able to both write material to post there, or hit publish on an existing note.

    Of this first list the last two immediately appeal to me. I should probably do the local form first, and then look at posting directly from notes (which may well need that form under the hood).

    Btw this and the other postings of the past days were made using the Micropub client, by writing them directly in the script that posted them. Good for proof of concept, but not a long term low friction solution. 😀


    Screenshot of typing this post directly in the postthisforme.php script I run locally, and which created this blogpost.

    This posting has been written on my local system, and then published through a simple PHP script to my site.
    Although there is still something wrong with how this script talks to the Micropub endpoint, it does work for most postings. Now that I have posting to the website working, I can start building on that to expand the possibilities of my personal micropub client.

    After solving the HTTPS issue I had, and reading once more the Micropub specifications, I succeeded in posting a blogpost to my WordPress site using the Micropub endpoint. This all as part of my quest to build my own Micropub Client.

    Having established I could post correctly, I tried out different types of postings I think I will be making this way. Which turned up an oddity:

    When the HTML I submit contains the label <svg>, or even <svg the endpoint returns a 403 error. Meaning it understands my request but isn’t allowed to execute it. This seems strange to me. I know that adding image files must be done seperately, but this is an SVG icon description in HTML with a path etc., not a separate file. On the IndieWeb chat channels it was pointed out this might be an issue with WP core, where attempts to sideload certain file types are filtered out, but as far as I can tell that is not what is happening here. Someone else on the IndieWeb chat could not reproduce the error. So perhaps it is something in the way I create my request.

    I’ve posted it as an issue on the Micropub github page, including the script I use to create the request to the Micropub Endpoint.