Six Colors
Six Colors

by Jason Snell & Dan Moren

This Week's Sponsor

Kolide: Cross-platform fleet visibility for your Linux, Mac, and Windows devices.
Start your free 14-day trial today!

By Dan Moren

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.

The first version of my shortcut used Python’s very useful strftime function to format seconds into a timecode.

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.

Seconds to Timecode Shortcut
The proof of concept shortcut I wrote to convert seconds to a timecode.

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

Shortcuts Dialog
Shortcuts’s input dialog box, which maddeningly requires you to click Done with your cursor.

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.

  1. Ironically a big chunk of that code is padding single-digit numbers with a leading zero. 
  2. Of course, I could have also split out the Timecode from Seconds shortcut and run it from within the Podcast Note shortcut. 

[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 His latest novel, The Aleph Extraction, is out now and available in fine book stores everywhere, so be sure to pick up a copy.]

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