roadrunnertwice: DTWOF's Lois in drag. Dialogue: "Dude, just rub a little Castrol 30 weight into it. Works for me." (Castrol (Lois))
[personal profile] roadrunnertwice

K, idk if y’all have ever messed around with the iOS “Shortcuts” app, but it turns out it is Legit.

So. On my Mac, I use a pair of oddball note-taking systems that I made out of baling wire, scrap lumber, and keyboard shortcuts over a decade ago and have been using daily ever since:

  • “Garbage Book” is just a clone of Apple Notes,* except that it uses my normal text editor instead of a separate app that I don’t like as much.
  • “FMP”** is, uh, baroque. There's a hotkey to get a text field that appends to a special text file. If I append a line that starts with something like ^didread, it’ll eventually get moved to a file like didread.txt (courtesy of a second hotkey that refreshes everything). And there’s yet another hotkey for quickly opening one of those note files by name.

    (I do realize what that all sounds like to a normal person, but trust me, it's a specialized ADHD workaround that solves some particular annoyances for me in a really sweet way.)

Since both sets of notes are just plain text files in a synced folder, I've always been able to access them on my phone. But it was way more awkward and slow, and I've always been on the lookout for ways to improve it.

Anyway, yesterday my dad was having brain surgery (he's doing fine, everything went great), and here's a thing about when someone close to you has major surgery: you sit around for a long-ass time, and you can't concentrate on any actual responsibilities for the whole duration (basically because the entire part of your mind that gives a flying fuck about responsibilities is wholly occupied with reacting whenever it's time to do something for said loved one). But a really frivolous and finicky project can be a great way to not obsess at 20,000 RPM over hypothetical stuff that you can't do anything about, so I decided to crack open that Shortcuts app that came out with iOS 12 and see if there was anything to it.

THERE IS. The card-based editing interface is weird as heck (it has some real strengths for programming on a touchscreen, but it also makes refactoring a pain in the ass, and was probably not intended for use on an iPhone SE), and the lack of some basic niceties like and/or expressions is pretty embarrassing (you can implement boolean logic yourself by adding more variables, but it looks like legit hell), but behind all that is a remarkably functional little scripting language with a coherent and consistent core and really unmatched discoverability.

It's probably even nicer for scripting apps that provide "real" Shortcuts actions, but even with just iA Writer's URL-based scripting and the built-in actions, I was able to completely*** re-implement both Garbage Book and FMP on my telephone over the course of two afternoons!

I now have little buttons on my "today" view for starting a new Garbage Book page, appending a line to my dump file, opening an FMP ^caret-tag file by name, and sorting ^caret-tag lines out of the dump file and into their real homes. (That was the one I didn't think would even be possible, but I totally did it!) And it all plays nicely with the edifice of Mac scripts that I've been using since '06.

Anyway, very satisfying results, a very impressive tool, also A+ distraction for that mandatory fret-in-the-hospital downtime.

_____

* Except this was ca. 2007 so it was more like a clone of Notational Velocity.

** Fast Memo Pencil? Fiendish Master Plan? Free Mashed Potatoes?

*** Wellll mostly completely. There's one thing I couldn't do on my phone from the original Garbage Book script: include part of the first line of text in the filename. That was always a nice feature, but c'est la vie; it's just a problem of different editing paradigms. In BBEdit I start by opening an empty editor window and typing for a while before hitting the Garbage Book hotkey to save, but in iA Writer I have to start by creating the file, so there's no first line of text to grab. I guess the editor itself could update the filename (Notes does this!), but it would have to know about my timestamped naming scheme to do that.