By Dan Moren
January 12, 2022 1:33 PM PT
Podcast Note workflow, now with Shortcuts
Last week, Jason wrote up his new podcast note workflow, using Keyboard Maestro and an AppleScript script. The end goal was to create a text file that contained notes about things to fix while editing, along with timecodes to ease the process of finding them.
It’s a clever idea but I found myself wondering whether or not the same thing could be accomplished in a shortcut.
The answer? Yes! Shortcuts on the Mac is actually a pretty ideal way to handle most of this process, because it’s good at dealing with files. My first crack at a shortcut was just eight steps long—not bad!
That said, there was a bit of a cheat in that initial version that used a few lines of Python, including the very useful
strftime function, to handle the heavy lifting of converting a time in seconds to a timecode.
But, as Jason rightly pointed out when I shared the shortcut with him, requiring the Mac in question to have Python installed could be tricky in the future, given that Apple seems to be deprecating its default installation of Python, among other scripting languages. While a third-party app might have been able to handle the conversion just as simply, the goal was to implement it entirely in what any Mac user would have.
I was confident that the timecode conversion could be done in Shortcuts, but I knew it would be far less elegant than the Python approach. Jason and I bounced ideas back and forth a little bit, and ultimately landed on using the Calculate Expression action.
If that sounds familiar, that’s because I used the same action back when writing my feels-like temperature shortcut. The Calculate Expression is a powerful one, but it’s not super well documented. In order to find out what math functions it actually supports, I had to search until I found a Reddit post detailing the options.
Unfortunately, given the nature of timecode formatting I couldn’t find an easy way to do the entire calculation in one action, so I ended up having to break it into three different calculations for hours, minutes, and seconds, and then combine them later.1
This process also ends up taking eight actions, which, combined with some tweaks to the original, yields a 20-step Shortcut that does the entire task, soup to nuts.2
Using the Shortcuts plugin for my Stream Deck, I can now press a button on that device to summon a dialog that lets me enter a note (or not), and then adds the relevant timecode to my notes file.
Honestly, the biggest downside may be that the input dialog that Shortcuts pops up doesn’t let you hit the Return key to submit it, in a weird disregard for decades worth of Mac UI convention. Here’s hoping that Apple fixes that oversight in a future release. (Update: Reader Nicholas points out that you can hit fn-Return to submit a dialog box that allows for multi-line input. Still, it’d be nice for there to be an option for single-line input that would allow just using Return.)
If you’d like to give the shortcut a whirl for yourself, you can grab it here.
[Dan Moren is the East Coast Bureau Chief of Six Colors. You can find him on Twitter at @dmoren or reach him by email at email@example.com. His latest novel, The Nova Incident, comes out in July and is available to pre-order now, so do it!]
If you appreciate articles like this one, support us by becoming a Six Colors subscriber. Subscribers get access to an exclusive podcast, members-only stories, and a special community.