I extended the capabilities of my microsub feed reader with the option to save web articles directly from the reader to my Obsidian notes in markdown format.

Until now if I wanted to save an entire article I found in my feed reader, I would open it in the browser and then use the markdownclipper browser add-on to add some context and then save the article in markdown in my notes. I wanted to cut out that step of opening it in the feed reader, by saving it directly to my markdown notes. In my feedreader I already have a response form to e.g. post a reply to a posting on my own site. Posting it to my notes means adding a path to how I process that form.

I had to find a suitable script for converting HTML to MarkDown first. Which I found in PHP League’s HTML-to-Markdown, as suggested by Jan Boddez. It requires Composer which I already had installed on my laptop.

I tweaked my feed reader’s response form to also (as a hidden field) include the original HTML of a posting (using htmlentities to stuff it into a form field value). The script that processes the form I altered to both have a path for posting to websites (using micropub) and a new path to make a note in Obsidian, which is then saved as a .md file to the folder I store all clipped articles in.
To make a note I shape the available input the same way I template clipping things from the browser. At the top is my rationale for clipping something and reference to the source, followed by the original posting after which I add some keywords as tags and again the reference to the source.

In the images below you see the corresponding elements marked both as they appear in the reader as well as the resulting note.

The article as shown in my feed reader:

1: the original HTML content from a feed
2: title of the article (prefilled by my feed reader)
3: name of the author (prefilled by my feed reader)
4: original article’s URL (prefilled by my feed reader)
5: the reason and context why I am saving this to notes (also used to write a reply to a post, or the reason for bookmarking something if it will be posted on my site)
6: a quote I want to highlight
7: keywords that will become tags or categories on my site, and tags in my notes
8: selector for which site to post to (zyl is my blog), or ‘obs’ for making a note in Obsidian

Except for that last one those numbers are marked on the image of the resulting markdown note.

The resulting note in Obsidian:

1: the original HTML content from a feed shown in Markdown as the main body of the note
2: title of the article, both shown as part of the content of the note, as well as the title of the note (where a timestamp is added)
3: name of the author (mentioned with the source both at the top and bottom)
4: original article’s URL (mentioned with the author both at the top and bottom)
5: the reason and context why I am saving this, always at the top as it helps me process the content better
6: a quote I wanted to highlight
7: keywords that have become hashtags

(This posting was also written in my notes and, except for the images, posted directly from Obsidian to my site. Meaning I can both automatically move material into Obsidian, as well as automatically move material out of Obsidian. I quite enjoy the feeling of using that ‘magic’.)

I can now create pages in WordPress using my personal Micropub client. This makes it possible for me to publish notes from my personal knowledge management system to my WordPress site as pages in the Digital Garden I keep there. Like this one as proof of concept.

In the past weeks I created a way to publish directly from my notes to my blog using Micropub. I also added a selector to choose to which site I want to publish to.
Now there’s an added option to create a page, and not just posts.

Until now I created those pages manually whenever I thought to document something publicly. The result of that is that creating a page involves a certain friction, and the number of pages has stayed very low as a result. I hope this step may make my pages section more useful in sharing documentation about e.g. concepts I find important or things I created.
Combined with the site selector this also means I can now easily add pages to my professional site, my company’s site and e.g. the IndieWebCamp.nl site.

(also posted to Indienews)

This page was created using my personal Micropub client. This allows me to post not only posts but also pages to my various WordPress websites. And to do so along several paths, such as directly from my local notes. This page is merely a proof of concept. My intention is to use this way of posting to better extend my publicly shared notes in my Digital Garden. For now it is just about creating new pages. A next step would be to also apply this to updating of pages.

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](https://www.zylstra.org/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.