By Dan Moren
January 21, 2022 10:03 AM PT
Last updated August 8, 2022
More podcast workflow tweaks
With the advent of Shortcuts on macOS, automation on the Mac has become more accessible than ever. There is no part of our workflows that we can’t automate and thus there is no part of our workflows that we cannot overautomate.
While developing the Podcast Note shortcut that Jason and I collaborated on, I ran into a dilemma. I had just recently adjusted all my Audio Hijack sessions, where I maintain separate instances for most of my regular shows, to save audio files within corresponding subfolders in my Podcasts folder.1 (The impetus was to get those hefty files off my Desktop, which is now synced via iCloud. No need to have several hundred megabytes uploaded to the cloud only to be removed within the hour.)
But that made my Podcast Note shortcut tricky, because it assumes the files it’s looking for will be in a single folder, not strewn through any of several subfolders.
There were a few different ways this could have been solved—I’m sure I could have adjusted the Podcast Note shortcut to search through all the subfolders and find the most recently modified file, for example, but there’s a risk of error, and it feels like at that point I’ve adjusted it to be too specific to my workflow.
So the answer, for the moment, was a combination of adjusting my current workflow and, you guessed it, building another automation.
I started off by creating an In Progress subfolder in my Podcasts folder, and adjusting all of my Audio Hijack sessions to put the recording files there. And while I could just collect those files at the end of a recording session and put them in the appropriate show-related subfolder, that sure seemed like a job automation could handle.
At first, I figured that Noodlesoft’s Hazel might be the right tool for this task, since it excels at watching folders and then dealing with files. But after playing around with it for a while, I couldn’t quite get it to handle all the correct conditions without creating multiple rules, and that quickly got out of hand.
But, while perusing the menu of actions available, I noticed the most recent versions of Hazel have added the ability to run a shortcut as the action part of a rule.
Back to Shortcuts we go!
In Shortcuts, I created a new Podcast Sorter workflow, in which it looks in the In Progress folder for audio files that haven’t been modified in the last minute (to avoid moving any files that are part of a current recording), then grabs an MP3 file from that files (all my sessions save audio from my mics and remote ends as WAVs, but record the whole shebang as an MP3 for convenience).
Here’s where I had to make another adjustment to my workflow. In order to have the file identified as part of a specific show, I had to alter my Audio Hijack sessions to use the name of the show as the first part of that MP3 file. Fortunately, Hijack allows you to use tokens representing the name of your session in your file name, so I just made sure that all my sessions were named consistently with the the subfolders in my Podcasts directory.
So now the shortcut can grab the first part of the MP3 name and check it against all the subfolders in my Podcasts directory to find the correct place for it to live. If it finds a match, it creates a new subfolder and moves all the files it found way back in the first step. (This ought to include any notes files created by the Podcast Note workflow as well.) If it doesn’t find a matching folder, it drops a subfolder called “Recording” appended with the current date into a generic Miscellaneous folder.
The one thing I wanted to do that I couldn’t quite make happen was use the current episode number of the shows I host. So, for example, if it were the latest episode of Clockwise, it would ideally create the subfolder as “Clockwise 435.” I could look for the most recently modified subfolder and pull the number out of the name, but that would only work in certain cases, which would mean more filtering on the Shortcuts end. For now, I’ve just named the folders the show and the current date, which I can edit later at my leisure, but I may go back to this in the future.
I still have to have the Shortcut itself triggered by Hazel, since Shortcuts on macOS doesn’t have any automation options, as on iOS.2 In this case, that’s by having Hazel watch the folder for files not modified in the last minute, then running the Podcast Sorter shortcut.
If anybody’s interested, I’ve provided the shortcut here, though it’s so specific to my setup that I’m not sure it will be of use to others as is. As always, if you’ve got suggestions or ideas, let me know!
[Dan Moren is the East Coast Bureau Chief of Six Colors. You can find him on Mastodon at @email@example.com or reach him by email at firstname.lastname@example.org. His latest novel, the supernatural detective story All Souls Lost, is now available for pre-order.]
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.