Blog

close
November 1, 2021

Shortcuts for Micro.blog

Announcing Humboldt

Humboldt is a new Open Source project I put together so that I could use Shortcuts to post to Micro.blog. Humboldt is built on top of Snippets from Micro.blog, which does the heavy lifting. Humboldt only exposes a small portion of Snippets, so there is room for Humboldt to grow in the future if there is demand for more functionality.

Humboldt is available for both macOS and iOS in the App Store.

The Main Humboldt App

The main app walks you though the usual Micro.blog sign-on flow. You just enter the email address you use for Micro.blog and wait for your sign-on email to arrive. When it does you just click a link in the email and you will be routed back to Humboldt which completes the sign-on for you. That’s all the main app does. You are now ready to begin building Shortcuts that communicate to Micro.blog.

Post HTML to Micro.blog

The main shortcut to use is the Post HTML one. You can submit just a short HTML snippet or a full blog post. The Title is an optional parameter, since lots of Micro.blog posts are short and don’t require them.

Here is a simple Shortcut that just asks for what you want to post and then does it. You can use this Shortcut completely hands free to post to Micro.blog.

Upload Image to Micro.blog

You can also upload image resources to Micro.blog. This Shortcut example shows it in action.

Get Blog ID from Micro.blog

This is useful if you have multiple Micro.blog blogs associated with your account. You can pass the result of this action to either Post HTML for Upload Image to work with the blog you want. Otherwise, those actions work on the currently selected default blog. You can change the current default blog using Micro.blog on the web.

Putting Them Together

You can upload blog posts with images embedded in them. In fact, that is how this blog post was uploaded to Micro.blog!

The Upload Image action has an output parameter. It is the published URL of the image. You need to save this for each image you upload and pass it to a step that manipulates the HTML of the post you will upload.

Your HTML needs to have placeholder text, unique to each image, that can be searched for. This placeholder text needs to be substituted for the image’s published URL. You can use the Replace Text built-in Shortcut action to do this. Now you can use Post HTML to post your updated blog HTML.

Zavala Integration

I wanted the ability to build a blog post in Zavala and then post it to Micro.blog. This is the original reason why I built Humboldt. Shortcut support for Zavala is “coming soon”, which is needed to tie everything together. When it is released to testing, I will post more about how to make Humboldt work with Zavala.

Future Updates

For now, Humboldt does everything I need it to do. It just posts to Micro.blog and that is about it. It can’t edit or delete posts or manipulate image uploads. You can use the Micro.blog website for that or a full featured blog editor like MarsEdit.

If there is community interest in expanding what Humboldt can do, I’m interested in hearing about it. Let me know what you would like to see on the Humboldt’s GitHub Discussions site.