Six Colors
Six Colors

by Jason Snell & Dan Moren

This Week's Sponsor

Save 20% on the award-winning Audio Hijack with coupon code 6C20AH!

By Jason Snell

More notes on Podcast Notes automation

If I’ve learned anything about automation, it’s that projects are never really finished. After I wrote about my solution to taking notes during a podcast recording, Dan followed up with his version of the solution, built using Shortcuts.

Shortcuts for the shortcut

But it keeps going. Several readers wrote in to point out that Dan’s approach could be simplified. Andrew Kerr suggested a single equation that converts the time into a number where 2:03:31 is represented as 2.0331 and then converted into proper formatting via a regular expression. Antonio Bueno suggested adding the seconds to the beginning of Unix time and then custom formatting the resulting time as HH:MM:SS. Both work. Antonio’s is one step shorter, and it’s the one I’m using in the current version of the Shortcut.

Then there’s the matter of entering in text to describe what’s gone wrong at the particular moment of the podcast being noted. Dan’s Shortcut is set up to ask for text—which frustratingly means you have click the Done button on the dialog box, because Shortcuts on macOS Monterey won’t let you use a keystroke. But it also accepts input, and this is a great workaround—especially if you use a launching app.

entering input

I use LaunchBar, but this will work in Alfred as well. In LaunchBar, I type the name of the shortcut, press the space bar, and then type the text I want inserted in my notes file. LaunchBar passes this text on to the shortcut as input, completely bypassing the step in which it asks for text.

My lesson learned in all this? I need to stop reflexively reaching for AppleScript to solve something when it might be handled entirely in Shortcuts. The Shortcuts version of my script is simpler and more accessible. I have it in my head that if I want to mess around with files on my Mac, I need to script Finder with AppleScript. It’s just not true anymore.

Finding the right interface

When I wrote my story about the original note script, I had only used it a couple of times. Shortly afterward, I hosted a few more podcasts and my approach to using the script—namely, placing two different buttons on my Stream Deck—did not survive contact with the enemy1.

This script needs to be executed with a minimum of mental overhead, because I’m trying to host a podcast at the same time. As I wrote originally, I find that writing on pen in a paper notebook to be too much overhead—which drove me to write this script. Pushing a Stream Deck button should be a lot easier.

And it is, sure. The problem is, an empty time code is not really enough most of the time—there needs to be more information. But having to type a phrase in a box every time there’s an issue was more overhead than I really wanted to expend.

I wired a second Stream Deck button to a Keyboard Maestro macro that displayed an interface on my Mac screen to let me choose from a bunch of different preset options. It seemed like it might be a better option, but in truth, moving my attention from the Stream Deck to my screen, and reaching for the arrow keys, was more distracting than I had expected.

So I’m off to a new approach, which I’ll be putting into use this week to see if it does a better job. Now my podcast layout on the Stream Deck has two buttons intended for notes: A plain Notes button, and a button that still launches a text-entry field for me to enter in a custom note, for the times when I need to be very specific about what just happened.

But that first button doesn’t run a script at all. Instead, it switches to a different Profile, which is what Stream Deck calls a different set of buttons—a new page, if you will. And on that page (at the moment) are six buttons.

A new page.

The button in the bottom left corner, which is the same button that I just pressed, simply adds the time code to the notes file. So if I really have nothing to add, I can press that button twice—almost zero cognitive overhead. But if I want to, I can choose from five other buttons with common issues—swearing, a technical problem, something that needs to be cut, a section or chapter break, or crosstalk (represented by an “x”). The idea here is that by keeping my eyes and fingers on the Stream Deck, this entire process will require less of a shift of concentration. (We’ll see.)

Once any of the buttons on this screen is pressed, Stream Deck returns to the previous set of buttons. This is accomplished by making these buttons a special Stream Deck type called Multi Action, which allows a single button press to perform multiple Stream Deck tasks. In this case, it runs a Run OSA Script action (more on that in a moment) and then the Stream Deck command Switch Profile to flip back to the original set of buttons.

Now, about that Run OSA Script action. Rather than make a bunch of different macros or scripts for every single different input, I wanted to use the ability of the script to accept input to pass different input to a single script. There are a few different ways to accomplish this, but I decided to use Gabriel Perales’s Stream Deck Plugin.

The script it runs is a recursive cheat—I’m actually just using AppleScript’s do shell script command2 to run the osascript command line command, which runs an AppleScript script and lets you pass input along the way. (I’m sure that, like Dan’s script, there are probably 15 different ways to accomplish passing input to a script or Shortcut from out of a Stream Deck button press. Let me know!)

The script attached to each button press looks like this:

do shell script "osascript '/Users/jsnell/podcast-noter.scpt' 'crosstalk'"

The only thing that changes is that final single-quoted item. So for the Swear button, it looks like this:

do shell script "osascript '/Users/jsnell/podcast-noter.scpt' 'swear'"

This approach means I don’t need to make a bunch of copies of my script3, or a bunch of Keyboard Maestro macros. And it means that if I adjust the script later, I only need to do it in one place—and all these buttons should will still work.

Like I said at the start, automation projects are never really finished. I’m sure this one will evolve over time. But I’m glad that so many of my friends who do podcasts have responded positively to this project. I hope it saves everyone—including myself!—a lot of mental overhead and time spent searching for a very specific bad thing while editing a podcast.

  1. The enemy is the coughing, swearing panelists, obviously. 
  2. If there’s a Stream Deck plugin to run a shell command, can someone point me to it? And if not, can someone write one? 
  3. I would use Dan’s shortcut, but I tried to pass input to it via the shortcuts command-line tool and it seemed way too complicated. 

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.

Search Six Colors