From Things 2Do
I have used many TODO and productivity programs. Many of them without success. I have used in the last 5 years a range of applications including simple text files, Chandler, TimeTo and even Emacs' Org-mode (totally awesome). I really liked Org-mode, however, it really got a bit chaotic and the lack of structure kind of bothered me. Also, the fact that it integrated bad (or not at all) with things like my Google calendar other related services made me look for an alternative.
Around 1.5 years ago I got a Macbook Pro, so I decided to try a Mac based TODO list application called Things. It was not as completed as Org but it was simple and beautiful. Initially it kind of worked OK, but after some months I started to notice some limitations regarding of how to handle projects and the integration with the calendar. Then, after an update, they changed some important features, breaking my "workflow".
I almost decided to go back to Org but I continued looking for alternatives, and I finally found a little jewel called 2Do. It is really similar to Things, but brings more structure and semantics for managing ToDos (same structures I used in Org-Mode) plus other features that I find interesting, like linking a TODO to a particular location and a really good integration with iCloud / Calendar.
Now, I have a lot of stuff in Things and I really did not want to copy and paste everything. Also in Thing you can't just copy several TODOs at one. So what TODO? (get the pun? :-P).
Well I discovered that Things offered and scripting interface using AppleScript. I don't really know a lot of Mac OSX and all these things, I come from Linux world and anything else but Perl and Bash doesn't sound to me really to "script". Anyway it looks like that the Apple guys have a nice environment for scripting using this "AppleScript" language (kind of weird, looks like Lisp at times). Things offered an scripting interface and you can access this programmatically do pretty much all you want with it You can see the capabilities of Things (and other scriptable applications like Finder and Evernote) using the AppleScript editor and the dictionary explorer (see screen-shot).
Cool. The problem is now that 2Do still doesn't not provide such an interface, but at least if you copy and paste several lines from at text file, it will create a TODO item for each line copied. Good enough.
So, I just have to quickly learn this new Scripting language?. Well, not, I am to lazy for that (although Things offered a nice AppleScript guide with a nice set of snippet to work with the Things objects). I discovered that Apple offered a Scripting Bridge so you can access this scriptable application from other languages. So why not use my favorite Language (Ruby) and quickly throw some lines and get all my todos into text files so I can easily import them into 2Do? Piece of cake, I just need to install MacRuby in order to access this cool feature.
Well, Not so fast cowboy, I can easily access all the objects but there was some problems with this. For example AppleScript sometimes properties have spaces and this is not as nicely mapped to Ruby as you would expect. After wasting time using irb I found this cool post from a guy who suffered something similar (thanks mate) and I found out how to access the important properties.
So finally this LONG script, run it with MacRuby and check out the code comments for extra quirks I found while finding out how to it:
If I have time and desire I might make a AppleScript version of this so more people can use it.
Comments
Comments powered by Disqus