This is a second POC attempt to directly post an Obsidian note to my website.

My script still merely grabs the filecontent and title from files created in Obsidian and saved in a predefined folder on my local system and sends it to my Micropub endpoint. But now it should also parse the content for Markdown and turn it into the HTML equivalent.

header 2

header 3

Bold text
Italic text

  • list item
  • another list item
    • indentend list item

Markdown link to my blog

What happens if I have a backticked block in my file

some nonsense here
$string = "stringtext";

As before nothing yet is done yet for tags, categories etc. This is just another attempt to see if the basic process can be made to work.

Screenshot of this posting as I wrote it in markdown in Obsidian

This is a first POC attempt to directly post an Obsidian note to my website.

The script now merely grabs the filecontent and title from files in a predefined folder, and sends it to my Micropub endpoint. **Markdown bold** is not transformed into bold HTML equivalents.
A link is in this text is [Markdown link to my blog]( is not transformed into a HTML hyperlink to my blog.

Nothing is done yet for tags, categories etc. This is just a first attempt to see if the basic process can be made to work.

I added this image of how the original looks in my Obsidian notes after successfully posting the text above using Micropub

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 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.