GlanceCam is an app developed by my friend, Cesare Forelli, and it's once that I've admired for a long time. In short, it's an app that lets you view IP cameras from your Mac. But in reality it's so much more, especially with the recent major update.
It's a relatively minimal design, however it's still packed full of functionality. It support multi-windows, always on top, 4K streams, you can use it to sent HTTP GET commands to your devices, keyboard shortcuts, a URL scheme, AppleScript support, and so much more.
This app is probably the main reason why I'm thinking of investing in some cameras for my house.
As much as I’m a fan of automation, I can’t say I’ve ever done much of it on the Mac. When I was very young, I used Windows computers and wrote quite a few batch scripts, but nothing that complex. When I switched to a Mac, I didn’t really have the need for automation, or at least I wasn’t aware of how it could benefit me. It only really clicked for me on iOS with Workflow Shortcuts.
As I’ve been a programmer for quite a few years, I have made a few tools for myself in the past. But weirdly never any automation. I’ve checked out Keyboard Maestro and Text Expander before, but to be perfectly honest, I didn’t think they were that interesting. The most I’ve done is set up Hazel to move screenshots into a certain folder, and to empty the trash when it gets to a certain size.
But even the minimal experiences of automation I've done on the Mac have been after I was really introduced to the concept of automation over on the iPad. And while I think Shortcuts can be improved in so many ways, I much prefer the simplicity of any Mac automation tool.
I think the problem comes from myself never really being a “power user” of the Mac. I’ve used it as a tool for school work, to develop software, and to play games. I don’t use Automator, I can’t be bothered to write scripts, and in general, I’ve never felt I needed anything automated. It’s also why Text Case for Mac has only just gained support for Services because I don’t use them myself.
Perhaps I should at some point attempt to try out automation on the Mac again, but I’d think it has to be a third-party tool, rather than anything built-in. But what I’d really want is for Shortcuts to come to the Mac. It would obviously need to work slightly differently, but I still think that it would provide a much more user-friendly experience than anything like Automator.
This may be incorrect, but at least my perception of automation on the Mac has always been something that’s only done by really professional users, or people with super complex workflows. But on iOS, automation is something that anyone can do.
I don’t link to podcast episodes that often here on the blog (maybe never?), but I had to share this episode about contextual computing, since I found it really clicked with me, and I think others may find it useful.
They talk about how you can build yourself processes on your computer which are specific to certain contexts, and allow you to reduce any friction or distraction when trying to complete tasks.
A few examples:
- Launching your task app and opening a specific project instead of being presented with all of your tasks.
- Launching a document from a task instead of having to navigate and find it manually.
- Storing URLS in an easy access location, like a Shortcut with a Show in Menu action with all the links, so you can access them without being distracted on the web.
- Adding content to a document without needing to open the app, find the document, etc. I use this to save interesting links in Craft that I may want to write about at a later point.
This idea resonated with me a lot, and I think it’s because partially I do this already, although at a smaller scale, and also because it just makes sense.
If you have a project to do, and that project has various tasks, documents, links, associated emails, etc. You can just create a central document in an app such as Craft, that can contain links to all the relevant information. So there’s no browsing to find a webpage, or searching through your email app, all the relevant pieces of information can be collected in a single place.
It might sound a bit weird, but after you listen to the episode I guarantee it will make sense.
David Sparks also wrote a great blog post about contextual computing over at MacSparky, which you should check out if you’re intrigued by the idea.
For those that don’t know, this blog runs on the Ghost blogging platform. A platform that is notoriously not that good at dealing with automation, or working from iOS devices, since they don’t have their own apps, and rely on third-parties integrating with their API.
The app I use for writing right now is iA Writer, and luckily for me, it has integrated with the Ghost API. So after I created an API token from my blog’s admin panel, I was able to publish to my blog. Except that you can only publish drafts, you can’t control things like tags or the slug, and the title is the name of the file, not the typical H1 title from the Markdown content.
I wasn’t happy with the process, since I had to use the web interface for every post, but I just got on with it because there wasn’t an alternative.
But, I’ve been looking into Craft recently, and it reminded me that my publishing workflow isn’t flexible at all. So there would be no chance of me publishing anything from Craft.
Ghost Admin API
That lead me to have a look at the [documentation for the Ghost Admin API]. Which to be honest I think is pretty bad, it’s written like a blog post, rather than clearly defining each request. Plus they override the
⌘ + F keyboard shortcut for a stupid search tool, so that made it more difficult to find anything.
After I got to grips with how it worked, I realised that it would be too much of a hassle to interact with the API just using the Shortcuts app. Simply because of the authentication method. It uses a signed JWT token, which isn’t a bad thing, but it is when you have to construct and sign the token yourself.
After you add a custom integration to your blog, you can find an “Admin API key”, which sounds pretty good. Except this isn’t a ready-made key that you can use for authorisation. First of all, this key is actually two things, one half is a key that goes as part of the
kid inside the JWT token, and the other half is a string that you need convert from hexadecimal into bytes, and then use that to sign the JWT token.
Which meant the only option was to write an app instead.
Although, not a fully functioning app, I only actually wanted a few Shortcut actions. So I ended up creating a SwiftUI app that looks like this:
However, there are actually three Shortcut actions that it provides:
- Get Blog Info
- Upload Image
- Create Post
The first one isn’t actually needed, but I used that to test out the Shortcuts action and API integration, since it has no parameters, and doesn’t require authentication. It just fetches some basic information about a Ghost blog.
But the first real action I worked on was uploading images. It was a bit tricky, dealing with accepting a file as an input, and then getting the data in a state where it could be uploaded. I had an issue for a while where the app didn’t have permission to access the file, so I had to copy the data, write it to the app, and upload it to the blog.
I’m not too sure how stable this action is, especially since the endpoint only accepts a few image formats (not HEIC). So I have to do a conversion first. Although I’m doing this in Shortcuts for simplicity. But at least it works!
Here is the Shortcut I’ve created to upload an image:
Now the big one, creating posts. This was a slightly bigger task, but a relatively straightforward one to build.
There are five parameters in the Create Post action:
- Status (Draft/Published)
Essentially, they just all need to be passed on to the API. A bit of formatting is involved, with the tags being parsed from a comma-separated list to an array of strings, and the HTML content being wrapped in Mobiledoc format (which is what Ghost uses).
There is a ton of data in the response, but since I don’t see most of it being useful, I only look for four pieces of information:
- Slug (I thought this would be helpful, not so sure now)
- Featured Image URL
I’m only using the title and URL in my shortcut right now, as it’s still pretty simple.
The first part of the Shortcut deals with the title. First of all, it removes the first H1 from the document and also extracts the title without formatting for later. This was taken from Federico Viticci’s Publish to WordPress shortcut.
After that, I use my app Text Case to format the title into AP Title Case, convert the Markdown content into HTML, and also to create a slug from the title.
Then I run it through the new Create Post action.
From there I have the post information, which means I can automate sending a tweet about the new blog post and launch the page in Safari.
It’s good to have publishing to the blog and Twitter in one place because I plan on experimenting with different types of posts on my blog soon, so it’s nice to have control.
To be honest, I don’t think the app will ever go public. That thought did pop into my head a few times while building it, but it will take a bit of work to make it user-friendly. I’d have to untie it from my blog, add some stability, and maybe even do error handling. Because right now, it either works or it doesn’t.
But you never know, maybe this is an idea I can take further? Not sure how much I’d need to charge for it though, since the number of people that have a blog, use Ghost, want to automate the process, and also want to pay money for it, is probably quite low.
In iOS/iPadOS 14.3, a long awaited Shortcut action will return. The 'Set Wallpaper' action. Couple this with the automation feature of Shortcuts, and you can build something simple, but very fun. It's still in beta right now, so if you're running the public release you will unfortuantely have to wait just a bit longer.
But for people that are running 14.3, you can make use of these two shortcuts I've created that rotate your wallpaper.
The first one simply looks in an album for photos, gets a random one, and sets it as the wallpaper. So you can just add/remove photos from the selected album, and let the shortcut pick it up.
The other is a bit smarter, as it has the option to choose a seperate for light and dark backgrounds. so depending on the current appearance that is set, it will choose from a seperate group of photos.
To use the shortcuts, you will need to specify the albums before you run them, but apart from that they're ready to go.
While these shortcuts will change your wallpaper, the magic comes in the automation. Using the Shortcuts app, you can use various triggers to run a shortcut. I haven't found a way to pick a time interval to have it automatically repeat, but you can just pick certain times of the day and have them each trigger the sa me shortcut.
I've just gone with a simple trigger of sunset every day, because I don't personally want it changing all the time. But having a new wallpaper every day seems good.
What I would like in the future, is if you could trigger an automation based on dark/light mode being toggled. Or if you could somehow create one of the adaptive wallpapers that switch between light/dark mode automatically.
When making an automation, make sure to disable ‘Ask Before Running’, otherwise you will need to okay it every time it runs.
I came across an interesting blog post today, where Matt Brunt set up an integration between IFTTT and Monzo (a UK bank) to help save money. So that every single time he tweeted, 20p would be transferred into a separate pot on his Monzo account, which itself would be locked away until just before the PS5 release date.
As soon as I read the article, I was instantly struck with ideas on how I could make use of a similar integration.
Personally, I don't have a big problem with being able to save money. I have a structure to my savings, and I'm very strict with myself to make sure I separate a portion of my wage every time I am paid.
What I do have a problem with is choosing when to spend money. I mean to say I have so much money I don't know what to do with it. I wish. But in general, I have a problem associating value to a purchase. For example, I purchased an iPhone 12 not long ago, but I probably wouldn't spend over £15 on a t-shirt, or even £60 on a pair of shoes. Whereas there are a lot of people that see enough value in a pair of shoes to spend quite a lot of money on them.
I tend to place a higher value on computers, whether it be a smartphone, tablet, or real computer. The main reason is that it's what I'm interested in. But I also use these products as tools in my life, and also to get work done. I use these products to develop apps, write for this blog, and the usual stuff like gaming and social media.
You'd think I'd be fine spending money on new iPhones, iPads, and Macs. But instead, the "normal" part of me usually decides that a new device probably isn't worth it, since a lot of times the current device can cope with what I'll end up doing on it. It's the reason why I own an iPad Pro 10.5", even though I've been wanting a 12.9" pro ever since they were available. I must admit, I was close to buying the model that came out earlier this year, but it didn't seem like a big enough update to force my hand.
But I still have that constant thought in my head that I need that 12.9" iPad Pro, and especially the new Magic Keyboard. Although to be fair, I don't need it, no-one needs an iPad. I want it, for quite a few reasons, but that's not relevant here (I've already dragged this out too far anyway). Let's now get to the point.
There would be no point of all this fuss if I didn't have some kind of goal, or to be specific, an amount of money I want to save. So the goal I'm setting myself is enough to buy a 12.9" iPad Pro (I guess that should be obvious by now). The model I want will be around £1000 I reckon, so that will be my target.
Alongside the iPad, I will also want the Magic Keyboard to do my writing on. But I'll leave that as a secondary goal to do after if this one goes well.
In the article by Matt Brunt, he set up an automation as a fun way to put some money away. But I've also seen other people in the past use it as a punishment, where they track some performance metric, and if they don't hit it then some money gets donated to charity (or somewhere else). Or others that use it for saving may use an environmental action to trigger the saving, something like every time it rains, a tiny bit of money is saved for a future holiday.
I have a theory that this automated saving technique could be used as an incentive, rather than something negative. Instead of punishing bad behaviour by putting money away, I plan on rewarding good behaviour by allocating money towards something I want to buy.
In this case, the reward will be buying an iPad Pro for myself, and the behaviour I want to use as the trigger will be publishing blog posts.
To me, this seems like a perfect fit. I want to get myself into a habit where I'm writing at a good pace, and regularly publishing to my blog. And I'd really love to eventually be doing that on the big iPad. So while I'm building up a habit, I'm also going to use this experiment as a way to prove to myself that I do actually want to write "long-term" and it's not just an occasional hobby.
For the automation, I'll be using a combination of the blogs RSS feed, IFTTT, and a specific pot in Monzo with an associated goal (Which has a cool image that I built using Robb Knight's tool, and is the featured image of this post).
It's a pretty simple process. Whenever there's a new item in my blogs RSS feed, money will be transferred into my pot in Monzo. Eventually, I'll hit the target, I'll order the iPad, and all my life's worries will go away (I think this is how it works?).
I've chosen the amount to be £1 per blog post, so it's pretty easy to calculate how many I'll need to publish before hitting my goal. 1000.
I had an idea on somehow basing the amount on the length of the post, or if it's a simple link post, but I think if I add to complex I probably won't ever complete it.
Anyway, this post will serve as the first out of 1000, and will fortunately/unfortunately cost me £1. Which means I've now got to go and write and publish another 999! Wish me luck.
A bit of a weird headline, I know. However, to be honest, this post was originally going to be a short aside, about myself being delighted with the delay function on my washing machine.
For content, I bought a house with my girlfriend a little over 18 months ago, and the seller left a perfectly functioning washing machine. It was always something we were thinking about replacing at some point in the future, especially when after a few months we noticed that it would occasionally leak water from the door. Probably just needed a new seal, but it was old anyway, and it didn’t fit the style in our kitchen anymore.
Luckily for us, a few weeks ago someone in my girlfriends family had a washing machine going spare (moving house), and it was in pretty good condition. So we gladly took it off their hands.
Fortunately for me, it had a delay function. I know it’s not advanced technology, I’ve seen what you can get for stupid amounts of money. But it’s enough to do the job for me.
The only issue I have with doing the laundry is that I always feel the need to do it at weird times. For example, it’s 22:00 and I’ve only just put a load of washing on. That’s not a problem in itself though, the issue is that I would prefer to have it freshly washed at a time where the sun is out and I am free to put it outside to dry. Right now, that time is around 12:30pm. Because that’s around the time I take my lunch break, and it means I can get it put in a few minutes, and it dries pretty quickly.
So by having a delay function, I’m able to be sporadically productive at weird times, put a load of washing in the machine, and set it to be ready for exactly when I need it. Except, the delay is exactly that, a period of time before the function starts, not a set time for it to run or finish by. Also, the precision is to an hour. So the only calculation I need to do is to work out the number of hours until noon the next day, and then subtract however long the wash duration is. Not exactly a hard calculation, but I’m lazy. So I came up with a needlessly complicated shortcut to do it for me.
If you’re expecting something minimal that just does the job, then look away now. This may look a mess, but it produces a pretty nice output.
You can check out a full size image of the shortcut, or download it straight away if you want to check it out. I’ll do my best to explain what’s going on, but it may bet easier to have a look yourself.
First of all, it asks for the time that I wish the washing to be ready. In most cases this will be 12:00, so that’s the default value. It then formats this time, so it can be used later in the format, and stores it in the
Washing Time variable.
Afterwards, it calculates the time between the current date and time and the selected time (which by default uses the current date). It’s to check whether that time has already passed in the current day or not. If it has passed, then I must mean tomorrow, if not, then it’s today. I could simply prompt for input, but if I can save any interaction then I will.
If it determines that I must mean tomorrow, then it adds 1 day to the date stored in the
Washing Time variable, and also sets a new variable called
Today or Tomorrow to “tomorrow”.
If it’s for today, then the date stays the same, and
Today or Tomorrow is set to “today”. This variable is nothing special, just a string that I use later on in the final message that appears. This if statement was just a good place to put it, to avoid duplicate logic.
Now it knows the date and time that the wash needs to be ready by, it also needs to take into consideration the duration of the wash. Similarly to the previous input, the most used wash on my washing machine is 76 minutes, so I put that as the default to make it easier.
That duration is subtracted from the earlier calculated wash time, this will be the time that the wash needs to start. It then calculates how minutes there are until that time.
That duration is now formatted into an Hour:Minute format. The minutes are first calculates using the modulus operation, and the hours are calculated by removing the aforementioned “minutes” value, and diving by 60.
There is a little if statement afterwards to check if the minutes value is less than 10. This is to make sure the minutes are always formatted as two digits. There could be a better way for this, but I know that this way works.
After calculating the delay needed, it wraps it into a friendly message with all the information I may or may not need.
Example: 🕰 The required delay for a 76 minute wash to finish today at 12:00 is 10:32 🧼
Now I’ve finished writing about this, it has occurred to me that I’ve blown this problem completely out of proportion. But it was fun, so who cares?
Washing Delay Calculator:
I came across Charty recently on Twitter, and it looks like it’s going to be a great addition to the growing collection of apps that are designed to slot directly into the Shortcuts app.
After playing around with it, I was going to write an in-depth article on what I thought about it, but instead I’ve found three articles that I think explain it really well. And they also include examples so you can see what type of charts you can create.
This is one of those apps that at first you dismiss, but when actually looking around the app you realise just how helpful it can be. That’s because developer Rodrigo Araújo has thought about almost every aspect of the app. Building on the success of his first app ChartStat he aims to make it easy for everyone to visualise any kind of data.
Making charts by hand is labor intensive. But it gets easier if you can make the chart one time and just update the data as new numbers flow in. If that sounds like a job for user automation, you’re singing my tune—and I’m happy to report that the new app Charty is built to add charting capabilities to the iOS Shortcuts app.
There are lots of Shortcuts actions and routines that generate data and could easily benefit from a simple bar graph or pie chart to provide useful insights more quickly and effectively. One example that comes to mind is graphing time-tracking data from Toggl once every week, let’s say, to see what tasks or projects you’ve been the most busy with — all without having to open the unpleasant Toggl app or the clunky web client from your iOS device. Charty is the perfect companion for those who accumulate lots of meta-data about their lives and want to frequently revisit and reassess the areas they are seeking to improve — whether that be calories burned, books read, or tasks completed, Charty plugs right into your existing Shortcuts routines and allows you to quickly turn those datasets into easily-digestible graphics. The option to create default chart format settings and custom “Export Profiles” of chart size, font size, and background color both help to add consistency in how your charts are formatted before saving them for yourself or sharing with the world.
Last night I spent some time reading on my iPad, and I noticed a few articles that I might want to link to from my blog. Except I didn’t want to start creating drafts in iA Writer, or doing any manual work. I just wanted a way to remind myself that I want to link to this at some point.
I started to think that I could simply create a reminder in the Reminders app (I’ve switched from Things), possibly with the URL as a note so I could get back to it when I needed it again. However, that would require me to then later load the URL, and fetch the details from it. And seeing as I would have had the article loaded at the time of reading, it made more sense to store this data, and then be able to reference it at a later date.
So I came up with an idea of two shortcuts, one to store relevant data about the article I wanted to reference, and then another which I could use to select from the list and kick off a draft in iA Writer.
That’s when I thought about using the recently released data store app, Data Jar, which is a fantastic tool for storing all kinds of data.
Store Link Post Idea
To start off, the Shortcut I created to do the initial data storing and reminder creation was relatively simple. It accepts input from the Share sheet, in the form of a Safari web page, and then has just three actions:
- Add a new reminder with the title of the article to my blog list.
- Create a dictionary with four pieces of data – the title, URL, any text that was selected that I want to quote, and also the author. Although I’ve found the author to not be very reliable.
- Store this dictionary at the end of my
draftslist in Data Jar.
Download the Shortcut: Add to Drafts List
Starting a Link Post
This shortcut is a bit more complex, as it has to do quite a few things:
- Retrieve the list of link post ideas from Data Jar.
- Show the list, and allow the user (me) to select an option.
- Transform the various pieces of data into a link post outline.
- Create a new document in iA Writer.
It’s a bit long, so I’ll put the long screenshot below, and then explain why it may seem pretty complicated for what it does, and the things I had to work around.
To start off, the shortcut gets the list of drafts from Data Jar. This contains all the drafts that have been saved.
It then does a little transformation with that data, using a temporary variable in Data Jar. It clears the value for the specific key I’m going to use, and then it loops through the list of articles, and extracts the title and the index of each article into a new list. This is because we need to show the list of articles, and also perform operations on the specific article that was selected.
The temporary list is then displayed, and from the chosen article, the Index is then used to fetch the complete article data from Data Jar. That includes the title, author, page selection (snippet), and the URL.
Once that data is extracted, the page section is formatted as a Markdown Blockquote via Text Case (my app), and then it’s put together with the rest of the data to form a basic link post outline.
Finally, the outline is URL encoded and opened as a new document in iA Writer via the URL scheme.
Download the Shortcut: Start Link Post From Draft
These two shortcuts are simple in theory, and to be honest I could have achieved the same result with less complexity, and maybe even without Data Jar. However, I like that the storing and kicking off a link post in iA Writer are separate processes. Because it allowed for more flexibility in the future and also doesn’t distract me at the time of reading an article. Which was one of the big reasons for me making these.
I really liked using Data Jar for these as well, so I hope I can make use of it again in future shortcuts!
Find the apps used, and the shortcuts below: