My friends troll me: A translation of select portions of Using Keyboard Maestro to create new Jekyll posts
One of my best friends recently sent me the following “translation” of an earlier post I wrote, and I thought some of you might enjoy it. I love him.
As I mentioned recently in Up and running with Jekyll, I hadn’t given any thought whatever to how I was actually going to go about automating the creation of new posts.
I spent at least 50 hours thinking about this, but couldn’t admit to that until I had a solution. Also, shameless plug for my previous post. Please read it.
Tonight I decided I would tackle that and ended going with a pure Keyboard Maestro solution.
By “tonight” I mean 4AM. By “I decided” I mean I’ve been awake for 72 hours and I physically can’t sleep until this is done. Help. Me.
(I may eventually end up just copying the AppleScript solution I came up with in Blogging with TextMate and Chromium/Chrome—which would be pretty easy to modify to handle the YAML front matter stuff I now need because of Jekyll—but I’m going to stick with the KM approach for now and see how it goes.)
I have over 13,000 hours of my life tied up in all of this and you lazy-ass n00bs just have no idea what kind of gold I’m giving away here. You don’t even care. Now read that post I linked to because the least you could do is give me another damn page view. I earned it.
The image below shows the entire KM macro I built for creating new linked-list posts. (The macro for regular posts is similar, but much simpler, and easily derivable from the following discussion.) While most of this macro probably is pretty self-explanatory, certain parts of it definitely aren’t, and so beneath the image I explain my thinking around those elements.
Buckle up, idiots, because by “self-explanatory” I mean that you would never have put this together in a MILLION YEARS on your own. I did it with a wife, an insanely busy job, and two hungry-ass cats to deal with.
The first thing the macro does is invoke the
If Then Else
action to determine whether I modified my hot key trigger for the macro with “Q”…
I know you’re just going to skip all of this, but whatever, I’m writing it out anyway, like a boss.
This worked just fine, but it wasn’t very elegant, and required
Pause
actions to be inserted in a couple of places because the GUI couldn’t keep up with the macro.
I’ve spent the last 6 hours convincing myself that the GUI not being able to keep up isn’t my fault. I finally believe it and am going to sleep.