Automated Copyediting on the Mac: Searching Google (or the Service of Your Choice) with Keyboard Maestro
Building on my previous post, Automated Copyediting on the Mac: Verifying URLs with Keyboard Maestro, in this post I'll describe how to search the web for specific text with a single keystroke. In this example, I'll use a place-name, but the workflow applies to whatever text is selected in the document at hand.
Let's say that we're editing along, and the author mentions Torrey, Utah. We want to do a preliminary check on the spelling of the place-name, so we highlight the text (whenever possible, I prefer to use the keyboard rather than the mouse in order to reduce repetitive stress) and invoke the Keyboard Maestro macro (detailed later) with our preferred hot key combination. In my case, this is Caps+G. (This hot key combination is bound to Control+Option+Command+Shift+G. How I manage that is detailed here.)
When I press Caps+G, the macro performs the following steps:
(Full disclosure: I'm definitively not a shell script expert. The below is a lifesaver that I borrowed from some generous soul somewhere online, which is how I develop most of my macros—i.e., laboriously and piecemeal. This method may not be perfect, or even syntactically correct, and there are no doubt myriad other ways to achieve the same result, but I know this works.)
Here is the shell script, which we paste into the "Execute Shell Script" action in Keyboard Maestro, exactly as presented:
open -a Safari "http://www.google.com/search?q=`pbpaste`"
This one-line script is easily modified to direct the search to whatever service we desire, as long as we know the structure of the given service's URL search parameters.
In Keyboard Maestro, the macro looks like this:
This incredibly simple macro saves me hours of time, if not per project then at least per month.
What my clients say
Kerry has done a great job copyediting for us. In addition to editing the manuscripts, he has also tagged one manuscript for our typesetter and done some minor fact-checking for another. His estimates have been accurate, and his work has been on time and thorough. He knows Chicago style well, and I would definitely recommend him for editing. I am always hesitant to try new people, as I have been disappointed in the past, but Kerry has proved himself, and he has now been added to our list of freelancers, which is a very short list.
- Amber Henderson, Managing Editor, AdventureKEEN