20 Jan 2014

An Ode to Automator

I had a folder full of TIFF files that I needed to convert to JPEG. I looked to see if any of my photo editors (Preview, Acorn, GIMP, etc) could do this, but they couldn’t.


At this point, I’d normally have given up, but on a whim, I tried using Automator. I wasn’t comfortable enough to try it by myself, so I did a quick Google search for “convert TIFF to JPEG Automator”, and followed the instructions. It actually turned out to be easy enough that I don’t need the instructions:




I wouldn’t have been able to do this using the command-line:


  • I don’t know what command-line programs can do this, and which of them are installed on my Mac. By contrast, Automator shows me the list of all possible actions. This is classic GUI vs command-line: GUIs show you what actions are available, while command-line interfaces expect you to already know (as if you were born with this knowledge).

  • The names actually make sense, like “Change type of Images” rather than gobbledygook like “rm”, “grep” or “chown”.

  • Available actions are grouped into categories like Finder, Photos, etc. Whereas the command-line is one heap of unrelated programs that you have to figure out by yourself. Note the categories Mail, Contacts, Calendar, etc — Automator lets you define workflows that operate on your data. Not all of which is represented as files. This is 2014, not 1960. Automator is integrated with the rest of the system, with your apps and your data in them, while the command-line is an archaic world onto itself, disconnected from the GUI where users actually work.

  • You can set up a pipeline by dragging and dropping actions one below the other. This is easier than using command | command or command `command` .

  • Parameters to the actions are shown in the GUI. You don’t have to scratch your head trying to figure out what parameters a command takes, what the acceptable values of each of them are, what the default values are, and whether they make sense for what you’re trying to do, and so forth. And you don’t have to read badly written man pages, which is to say, all of them — they don’t tell you the common stuff first, they explain things at an abstract, hard to understand level rather than via example, and so forth.

  • It’s easy to get input as files, by adding an action to the workflow to “Ask for Finder Items”. Navigating a File Open dialog box is consistent with how files are opened in the rest of the OS, and is an order of magnitude easier than trying to hardcode names into a shell command, deal with mistyped names, worry about the current directory, and so forth. If you want to select all files in a folder except for two, that’s trivial with a File Open dialog box.

  • Automator actually helps you as work. For example, when I dragged the action to “Change type of images” into my workflow, Automator warned me that the action will change the type of my files in-place, and offered to add an action to duplicate the files. Whereas command-line crap like rm will silently and irrevocably delete all your files.

  • You get an in-built progress bar as you work.

Automator gets every one of these right, while the console gets every one of them wrong. That’s impressive by itself.


I was able to accomplish my task in seconds in Automator, but not in the console, despite more than a decade of experience with the latter, and hardly any experience with Automator.


This is a testament to how well-designed, sleek, simple and simultaneously powerful Automator is, as compared to the clunky, crappy train-wreck that’s the terminal.


The sad part in all this is how under-appreciated Automator is.

No comments:

Post a Comment