On CriticMarkup

Screen Shot 2013 02 15 at 7 50 36 PM

The Concept

I’m a proponent of plain text writing and (Multi)Markdown in particular. It’s almost certainly future-proof and it’s ultra-portable. You don’t have to worry about what applications people have installed or even what platform they’re on. Plain text just plain works. Unless you’re doing editing of someone else’s work. By that, I mean, how do you convey additions, deletions, and comments in a plain text system? Microsoft Word and Pages have sophisticated commenting systems in place and they work well. Plain text will never have such a system where little sticky notes pop up and display changes, but there has to be a way to express changes in plain text. CriticMarkup aims to be a plain text commenting system and it’s a great idea. The biggest hurdle to a system like this is adoption. If uptake is slow or non-existent, then its useless is diminished. You also don’t have to worry about someone having a specific tool to use CriticMarkup; you just have to get them to agree to use it.

How does it work?

You can take a look at the CriticMarkup site, but here are the basics.

  • All tags are wrapped in { }s.
  • All tags consist of two distinct characters (++,–,>> for example) wrapped around an addition, deletion or comment.

An addition would look like this:

  • This is a thing wrote.
  • This is a thing {++I++} wrote.
  • This is {–a–} thing I wrote.
  • This is thing I wrote. {>>You’re missing an “A”.<<}

Get the idea? It’s a nice system, but its success will depend on two things: adoption and tools.

The Tools

The tools to make use of CriticMarkup are kind of a weird mess right now. There are TextExpander snippets, Keyboard Maestro macros, a BBEdit code-less language module, a Sublime Text package and a CLI for turning the original documents in a fancy looking HTML document that shows both the original and marked up documents inside of it. The CLI and Sublime Text package seem to be where the bulk of the work went into. The BBEdit CLM isn’t that useful, the TextExpander snippets are only good for creating comments, and the Keyboard Maestro macros weren’t fully fleshed out.

BBEdit Tools

There’s a BBEdit AppleScript for approving (but not declining) markup, but it errors out if you open it up in AppleScript Editor. The CLM that’s included works but doesn’t do much other than help BBEdit understand .crit extensions and lets you just to CriticMarkup items from the toolbar. That is pretty useful, but it doesn’t do anything to the document preview.

Keyboard Maestro Tools

I found a few mistakes in the Keyboard Maestro macros included in the CriticMarkup download. The comment macro created the correct markup when some text is selected, but created “{<<>>}” with no selection. The highlight macro was also incorrect. The palette the CriticMarkup Keyboard Maestro library creates is poorly labeled and the hotkeys don’t make sense when you’re firing a palette up anyway. Here’s my improved palette. I hope the guys over there don’t mind.

Is this endeavor worthwhile?

Sure. It’s a great idea. If the adoption rate is high, it would be great. After reading Glenn Fleischmann bit about Tidbits’ switch to Markdown and their difficulties in editing article in plain text, I’d love to hear their feelings about CriticMarkup.

Use Keyboard Maestro to Record Something New You Learned Everyday

Screen Shot 2013 01 09 at 9 11 14 PM

So, it’s 2013. I’m not for resolutions. I believe that if you’re not willing to change your life in September, you’re not willing to change it in January either. I found an article a little while ago about a guy who recorded something new that he learned every day in 2012. I loved the idea but I knew that I’d never keep up with the habit if I didn’t automate it, I’d never actually do it. So, I decided that because it’s something that I’m going to eventually want to post this online at the start of 2014, I should make sure it’s in Markdown. I chose this style.

# Month

  1. Thing I learned.
  2. Another thing I learned.

It seemed cleaned and would be easy to post on this blog later. So how can I automate this? Keyboard Maestro, of course!

I created a Keyboard Maestro macro that fires every night at 8:30pm and pops up a prompt asking me what I learned today. What you answer is turned into a variable and then the file I chose gets this appended:

\n[day of month]. (Thing I learned.)

The \n is a line break and makes sure everything stays nice and clean.

The biggest problem I thought I might run into is, what happens when the month changes? By running the AppleScript: month of (current date) you can get the name of the current month and spit that out as a variable. So, first, I check the day of (current date) and if it’s 1, then the this appended:

\n# [name of month]

This ensures that when it’s a new month, the current month gets added and then the regular part of the macro runs and adds the thing I learned for that day.

Download a sample of the macro here.

Update: 2013–01–09 @ 9:19 PM

I got to thinking about making this macro really evergreen. If you save an AppleScript to check year of (current date) as %Variable%dateYear% and then add %Variable%dateYear% somewhere in the filename of the text file you’re using, this would create a new 2014 text file next year as well!

Automate Sticky Notifications with Keyboard Maestro

I bought Sticky Notifications a few weeks back and couldn’t think of much use for it. I was thinking today that it might be a good idea to take flagged items from Omnifocus and have them on the desktop as sticky notifications so that I make sure I don’t forget about them. I made three of them, and then figured I should automate it. It took me a while to figure out that I needed to filter the clipboard with percent encodes to make it work properly.

If you have multiple items selected when you invoke the macro you’ll get everything selected, but in one single reminder, but it works best on individual items.

Here’s the macro:

Screen Shot 2012 11 16 at 11 39 58 AM

And here’s the download link.

Use Keyboard Maestro to Create a Remote for MPlayerX

This was actually my first stroke of genius using Keyboard Maestro. I created a set of macros that would let me control MPlayerX through the Keyboard Maestro iPhone app. MPlayerX uses simple keyboard commands to control all playback functions so it’s easy to make macros that can control it. This small set will change episodes, skip forward, play, pause, stop, and even black the screen on your Mac if you’re watching it through your TV. The important point is to have each macro activate MPlayerX so that you don’t have to have MPlayerX in the front to make it work. The macro group is always available, and thus, useable anytime.

MPlayerX Remote

Toggle WiFi with a Hotkey using Keyboard Maestro

I came up with a little Keyboard Maestro macro that will Toggle WiFi on and off. It pulls up the network preference pane, waits until the front window is “Network” and then an If/Then/Else action presses the button “Turn WiFi Off”. If that button isn’t available, it presses “Turn WiFi On”, effectively toggling WiFi. The only thing you need to be mindful of is that “WiFi” needs to be the top listed network connection in the network preference pane.

Use Keyboard Maestro to Create Inbox Macros for Omnifocus

I’ve been playing around with AppleScript and Keyboard Maestro a lot lately, and while I haven’t completely mastered AppleScript with Omnifocus, I’ve figured out how to combine existing scripts from others with Keyboard Maestro to achieve my desired result. For example, I want to be able to batch process inbox items to start at “17:00″ with a context of “Home” and flag them. That way, things I can’t do at work are out of sight until they can actually be done.

What I did was create a Keyboard Maestro macro that calls up menu items for the context “Home”, “Set Flag” runs the “Today” script from Dan Byler that I modified so that the start time is 17:00 and then Keyboard Maestro simulates ⌘ + K to clear the inbox. It works well enough. I’d love to do it all with Applescript, but I couldn’t figure out how to get AppleScript to process all tasks selected, so this’ll have to do for now.

Screen Shot 2012 06 01 at 11 14 00 AM

Screen Shot 2012 06 01 at 11 14 12 AM