Todo.txt to Omnifocus

For a long time now, I’ve been trying to figure out the best way to get stuff into my todo list on my Mac from my Android phone. I should say that I belong to the crazy group that uses OmniFocus, which is obviously a Mac app. They have wonderful iPhone and iPad apps, but I don’t have an iPhone. Sure I could carry an iPod touch around with me everywhere I go and for the most part I do, but my HTC Hero is with me 24/7.

This may not be obvious to everyone, but the best todo list app for Android is Todo.txt Touch by Gina Trapani. This thing almost made me drop OmniFocus, but I really like what I’ve got going in OmniFocus so instead I’m using Todo.txt Touch as input.

I’ve written an AppleScript that will look at my todo.txt file stored in my Dropbox and send everything over to OminFocus:

tell application "Finder"
    -- readFile
    set TodoTXT to "<Path to todo.txt>"
    set foo to (open for access TodoTXT with write permission)
    set txt to (read foo for (get eof foo))
    set eof foo to 0
    close access foo

    set Names to paragraphs of txt
    repeat with nextLine in Names
        if length of nextLine is greater than 0 then

            tell application "OmniFocus"
                set theDoc to first document

                tell theDoc
                    make new inbox task with properties {name:nextLine}
                end tell
            end tell

        end if
    end repeat
end tell

Beware, this is my first iteration of this script. That doesn’t mean I’m promising future versions. I’m only using the Android app as input at this point. It will import all of your todos to the inbox and then blank the file.

Running it

First, Hazel is setup to watch the folder in my Dropbox with a rule that watches for the Created Date to be the same as the Modified Date. This basically means that the file is brand new. It might not be obvious at first why this works. Basically, when the todo.txt file syncs from Dropbox it is replaced with a new version, thus creating a new file in place of the one that was there. When the script then goes and updates the file, either by blanking it or, maybe in the future, updating it with todos from Omnifocus, it is modified locally and not recreated so the two different dates would be different.

The other way I can run the script is from within OmniFocus itself. The script lives in ~/Library/Scripts/Applications/OmniFocus/, which let’s you add it while customizing the menu.

Feedback

If you find this useful, let me know. If you go on to modify it and make it even more useful than it already is, I’d love to hear about that too.

Update

After David Sparks linked here on his MacSparky blog, one user suggested a shorter version of the script:

set p to "<Path to todo.txt>"
set l to paragraphs of (do shell script "grep . " & p)
do shell script ">" & p

tell app "OmniFocus" to tell document 1
repeat with v in l
make new inbox task with properties {name:v}
end repeat
end tell

Thanks for that and thanks to David for linking here.

Jetpack by WordPress.com

It’s been quiet around here. I’ve been busy, but I couldn’t let this one slip past no matter how much else I have to do.

Matt and company surprisingly released a new plugin for us .org users today. He actually hinted at a new project abbreviated JP in his new years resolutions, but who guessed it would be called Jetpack?

So, what exactly is Jetpack?

Jetpack supercharges your self-hosted WordPress site with the awesome cloud power of WordPress.com

Really, it provides a reason for me to stop second guessing myself about whether or not to host my blog on WordPress.com. Not that I would ever have actually done it, but I’ve often considered the advantages of using Automattic’s managed WordPress solution.

Besides practically bullet-proof servers, WordPress.com users have always had a few shiny things that have made the service tempting – even for people like me who want control over every single aspect of what is my website.

What do we get?

Initially we’re getting updates to WordPress.com Stats, the Twitter Widget, Gravatar Hovercards, WP.me Shortlinks, Sharedaddy buttons, LaTeX, After the Deadline, and Shortcode Embeds. And it looks like there’s more on the way. This is all packaged in one, nice plugin and updated and currated by Automattic.

Now, I won’t be using all of the extras, but right away the Stats and Sharedaddy links seem quite useful. I definitely won’t be using the Twitter Widget or WP.me Shortlinks, as I’ve got custom solutions that solve both of these problems in a way that I like. I haven’t been a fan of shortcodes lately, so I probably will skip that one as well. After the Deadline is something I’ll probably turn on for awhile and I’ve already got some ideas for ways to implement Gravatar Hovercards.

The Future

More than anything, this has me excited for the future of what this could mean for self-hosted WordPress. The additions that they’ve decided to ship with are cool, but I see a ton of potential for this product.

One thing that I’d really like to see is tighter integration into the WordPress.com network with a “WordPress bar” for users who are currently logged in to their WordPress.com accounts with subscription options, random post, shortlinks buttons, and the like. At this point, I can’t see anything stopping them from implementing these features. It would make that network instantly larger and more valuable.

Go get it

I definitely recommend everyone with a self-hosted blog go check out Jetpack. You can get it from the dashboard by searching for “Jetpack” in plugins or go to their website at jetpack.me

Instead of going with one of the Smashing Magazine Wallpaper Calendars for this month I decided to make my own. Photo Credit. Download

Kindle Review

As many people know if you watch the smmas podcast, I recently got a Kindle 3. I haven’t been a huge reader. There have been a few books in the past year or so that I’ve taken time to read, but most of the reading that I do is on the web. Now, if I knew that wasn’t going to change, I probably wouldn’t have bought a Kindle, but there has been a small list of books growing over the past 6 months or so that I want to read, with more coming in the next 6 months. I also want to read more books in general and figured this would be a pretty good way to do it.

Quality

The first thing that I notice when I hand someone the device, even before commenting on how small it is, they ask if the words are real or if there’s something taped to the screen. I know exactly what they mean because I wondered the same thing when I first opened the Kindle and saw the Amazon Kindle screen. At first I thought there was a protector taped to the screen like you get with other types of devices. People are usually amazing when I then take the Kindle out of sleep mode and show them them that it is actually just what the screen looks like.

The letters are so smooth on the screen they almost look fake. It’s hard to believe any hand-held device could be so easy to read.

Content

There are several ways to get content on the device. The first, and most obvious way, is the Kindle Store. I believe Kindle books are in a proprietary Amazon format, but that doesn’t really matter because I don’t know of any way to get the books out of the Kindle. You can, however, install the Kindle application on any iOS, Android, Mac, or PC, as well as being able to sync with any other Kindle that you might own, so it’s not as though any books you purchase are stuck on this Kindle. They are tied to your Amazon account and are available in any Kindle or Kindle app. One of the really nice things about the Kindle store is that you can try any of the content before you actually purchase it. For books, you can send a sample to your Kindle and for Newspapers and Magazines you get to try the first 14 days for free.

Along with the Kindle store, you can also put any .mobi books on the Kindle. This includes all of Project Gutenberg and other sources like A Book Apart. I did notice that there’s a large collection of public domain books available from the Kindle store, so I haven’t had a chance to actually grab anything from Project Gutenberg yet. I did buy a couple of books from A Book Apart though, and was able to email the books to my Kindle, which worked great.

Before now, I haven’t been a user of Instapaper, but it works great with the Kindle and will automatically send unread Instapaper items weekly or daily just as a newspaper. It has been a great way to read some of the news that I’m not willing to read on my LCD monitor, or a good way to read when I’m out away from my computer or on the road.

Overall, it’s nice to be able to carry around this super thin, super light device with a full library of books, newspapers, magazines, and web articles, and be able to read all of that anywhere in book-like quality and readability.