I’ve been reading Dr. Drang’s blog for as long as I’ve had an RSS feed reader. It’s always a delight to read his chipping away at the inertia of computing’s edge cases. Case in point—a simple date command macro launched via Keyboard Maestro. Dr. Drang writes:
After a little thought, I realized that a Keyboard Maestro macro with the right kind of user input prompt could incorporate all of my little date commands and would be faster and easier to use than any of them.
My three little date commands are since (previously named ago), til, and between. since takes one argument, a date in the past, and returns the number of days from that date to today. til also takes one argument, a date in the future, and returns the number of days from today to that date.
since and til are actually the same program saved under two different names. The name used to call the program determines the sign of the return value. since returns a postive sic value if the argument is before today and a negative value if the argument is after today. til does the opposite. between takes two date arguments and returns the number of days between them.
My new Keyboard Maestro macro, Days Between, uses the logic of between, but its interface is set up so I only have to enter one date if I want to use it like since or til, which are the commands I use most often.
Keyboard Maestro is one of those Steve Jobs-esque bicycle tools that help mega power every workflow. One time for a client, I wrote a script for an SMS tool to import phone numbers using Google Chrome and XPath. I took a multi-hour task and turned it into a coffee sipping activity.
I’m always a fan of this XKCD that literally showcases if its worth the time to make these tiny scripts. In my mind, much of it boils down to adding more delight and reducing friction on my computer. I have tiny bash scripts I’ve written for creating folders, for launching my server, Wi-Fi control, killing coreaudio Daemon (due to M1 audio crackling), and more.
Plus, ChatGPT is making it easier to create these mini scripts with just natural language input. I’ve written tiny scripts to convert RTF files to TextBundles or PNGs to JPGs in multiple folders without dealing with RegEx hell.
Oh, and launch your scripts quickly with some Alfred or Raycast love. I actually use both tools in combo with Raycast as the primary tool because its search integration is really fast and stable (and doesn’t seem to be based on Spotlight? I could be wrong here).