Brett Terpstra just posted a very nice tool for inserting dates using Natural Language. His post is definitely worth a read.
Given my preference for Python and my previous experience with Natural Language Processing, I decided to implement something similar through a Keyboard Maestro trigger.
I have a macro that pops up a text box and asks for the date language you would like to interpret. Apparently KBM does have a leg up on TextExpander, in that it can accept input to a shell script or applescript.
I guess I’ve reached a transition. I started doing serious programming in AppleScript many years ago. But now I need this guide to write AppleScript effectively. I spent so much time in Python that I suck at AppleScript now. That’s how I like it.
After upgrading to Lion I quickly discovered that many of my custom macros that depend on Python were broken. A busy schedule meant that I put off researching the issue. Fortunately DrDrang’s recent post shed some light on the issue.
It appears that Lion uses a newer version of Python (2.7) and also has a bit more restrictions when installing packages. If you want to get your python customizations back you’ll need to perform some maintenance.
I’m really digging into the new features in Keyboard Maestro 5. In particular, there are some great new options for getting and setting variables. I figured that KM is now mature enough to return to some problems I never found an elegant solution for. And by elegant, I mean a solution that did not involve a huge AppleScript.
The first thing I focused on was a system wide function to take a url from the clipboard and post it to Pinboard.
I really loved the OmniFocus CLI posted over on dirtdon.com. I loved it so much that I decided to build my own, but instead of a shell script, I wanted to explore a solution in Python. I solve quite a bit of my own little problems using Python. I’m no expert, but I like this scripting language for small solutions. I also wanted an excuse to learn more about Python’s Natural Language Processing (NLP).
Even though I’m not on WordPress anymore, I still think the XMLRPC Python library is very good.
Dr. Drang is now using the same module to replace the TextMate blogging bundle. Nicely done.