I just saw someone wearing noise-canceling headphones get into their car and immediately start to drive away without looking. He narrowly missed slamming into a car that was already in motion and was honking its horn, probably because he didn’t see or hear it.
Installing the iOS 12 public beta on my iPad mini. Looking forward to trying out Siri shortcuts.
YNAB just launched an API. Looking forward to trying this out.
The recent changes I made to my blog to add microblogging support included setting up a Micropub to GitHub web service. This allows me to use the Micro.blog app (or any other Micropub-compatible app) to compose and publish new microposts. However, the web service doesn’t currently support a Micropub media endpoint, so I can’t attach photos to new microposts using the Micro.blog app.
Once again, Workflow to the rescue! I’ve created this workflow for publishing microposts on my Jekyll-powered blog that can also include photos. Instead of relying on the Micropub to GitHub service, it uses GitHub’s API to directly upload and commit the micropost–and attached photos–to my blog’s repository. This automatically triggers a site deploy on Netlify, making the new micropost and photos available a few moments later.
When run, the workflow does the following:
- Prompts me to write a new micropost.
- If the workflow was not run as an action extension, it asks if I want to add any photos (the workflow checks if any photos were shared when run). I can then select photos from my library.
- Resizes all photos to 1000px wide. Photos that are already smaller than 1000px are not resized. I don’t want to share full-size photos, so reducing the size suits my needs.
- Asks me to confirm or change the file name for each photo.
- Uploads the photos to my GitHub repository and commits the changes, triggering a deploy with Netlify.
- Creates the micropost text file with the composed text and current date. If photos have been included, Markdown-formatted photo links are added at the end of the text file. This text file is uploaded and to GitHub and committed. Netlify then does another deploy, making the post available.
Although I created this workflow primarily as a way to publish photos, I can also use it to quickly publish text-only microposts. What’s more, I can even dictate new microposts and publish them straight from my Apple Watch.
If you wish to customize the workflow, change the following parameters in the Dictionary action at the top of the workflow:
token: A GitHub token that has read/write access to your repositories.
username: Your GitHub username.
repo: Your site’s Repository.
directory: The directory to save images to.
site_url: The URL to the website.
post_dir: The directory where micropost text files should be saved to.
The configuration options have been created based upon my implementation of microposts. Depending on how (and where) you publish microposts, you might need to make some additional changes to the workflow.
Decided to change my Micro.blog username to match what I use elsewhere. Always nice to be the first @jordan on a platform but the inconsistency was bugging me far too much.
I’ve created some workflows (soon to be shortcuts) so I can quickly post text and photos to my Jekyll-powered microblog. They use the GitHub API to upload and commit files to master, then the changes are automatically deployed by Netlify. Will write up a post about this soon.
Just added support for microblogging to my own blog. Hopefully this means I might post more frequently!
I didn’t want existing followers to start seeing microposts in their feed readers without opting in, so the current RSS and JSON feeds continue to be used for blog posts only. If you’re an existing follower and also want to receive microposts, you can either use the new feed for all posts or subscribe to the additional feed for microposts.
Thanks to this helpful guide by Fiona Voss about microblogging with Jekyll (the static site generator this site uses), I’ve also set up a Micropub to GitHub service. This creates a Micropub endpoint that converts requests into a Jekyll-compatible format and commits them directly to my blog’s GitHub repository. With this endpoint, I can use the official Micro.blog app (or any app that supports Micropub) to write and publish posts.
Once a new micropost is added and committed to the repository, a deploy is automatically triggered over at Netlify that publishes the latest changes.