michael-mccracken.net

Voodoopad lines to iCal todos

I take notes at meetings in VoodooPad, and as such I write a lot of to-do items in MeetingNotes pages. They tend to get buried in those pages unless I do something about it fast. Sometimes I put them somewhere more useful, like on my “TodoToday” page, but that page is getting more like a “TodoSomeday” page, and isn’t fit for serious action items. Today I realized that I wanted a script to take line-items from VoodooPad pages and make them into Todo items in iCal, so I can track them easier.

I already have a Quicksilver plugin for creating new todos, so I repurposed it as a python plugin for VoodooPad to add a big list all at once. Check out Gus’ post on python plugins for the enabler, and then check this sucker out:

VPScriptSuperMenuTitle = "Notes"
VPScriptMenuTitle = 'Create Todos in iCal'

import os

def main(windowController, *args, **kwargs):
    tv = windowController.textView()
    s = tv.string()
    ranges = tv.selectedRanges()

    scriptString = ""
    for r in ranges:
        rs = s.substringWithRange_(r.rangeValue())

        lines = rs.split("\n")
        for line in lines:
            if len(line) < 1: continue
            scriptString += "tell application \"iCal\"\n\
            set theCal to (first calendar whose title is \"Work\")\n\
            make todo at end of todos of theCal with properties\
            {priority:0, summary:\"%s\"}\n\
            end tell\n" % line
        
    f = os.popen("/usr/bin/osascript", 'w')
    f.write(scriptString)
    f.close()

Want to add to it? These and many things are easily imaginable:

  • Change priority based on the first character of each line
  • handle continuation lines better
  • change calendar to select based on some simple syntax, like “* foo” is a line with text “foo” but “*foo bar” is a line with text “bar” destined for calendar “foo”…
  • Another idea: a line starting with the words “email” or “mail” be made into a todo with the glyph ✉, and/or an actual email in Mail.app.
  • Any other ideas?
Comments:
  1. Walt
    September 22nd, 2006 | 8:35 am

    Michael, this sounds like precisely what’s required to take VP the “last mile” to becoming a complete solution for GTD; the Address Book integration is sufficient, but i must send ToDos from VP to iCal for this to work in my case (because of the smart phone imperative, as described by “tavilach” at http://www.flyingmeat.com/board/viewtopic.php?p=2360 ; obviously i’m not the only one in need of this). Only problem is (as i said in aforecaptioned thread), i don’t know how to plug-in this script you posted above (tho i’ve got PythonPluginEnabler installed and working) - so if you would be so good as to advise (by email, if not to aforecaptioned thread to which i’ve subscribed), i’d be much obliged. Thanks!

  2. September 22nd, 2006 | 12:07 pm

    Walt, install it by saving the script into ~/Library/Application Support/VoodooPad/Script PlugIns/

    I’ll reply by email too but this is here for posterity.

    Also, I can’t guarantee it works with VP3. I can’t test it right now.

  3. Walt
    September 25th, 2006 | 12:10 pm

    Hey, Mike: Thanks for the superquick response - which seems perfectly consistent with advice that Gus has also provided over on the FM board (he also advised to give the file a .py extension, and restart VP, which i did). Unfortunately (as i said in my answer to Gus on FM board - see http://flyingmeat.com/board/viewtopic.php?p=2366#2366 ), it did not work. Maybe it’s related because i’m using version 3.1.0 (1091), if you think that matters… But isn’t there some .pyc file that must accompany the .py script, if related function(s) are to be available in the VP interface? Obviously i’m weak in my understanding of the architecture here (as a user, not a programmer), but i can follow instructions like a good dog, if i can get somebody to spoonfeed me step-by-step… Any chance of that here? :-)

  4. October 25th, 2007 | 6:25 pm

    [...] Voodoopad lines to iCal todos “…script to take line-items from VoodooPad pages and make them into Todo items in iCal…” (tags: applescript gtd howto ical mac osascript osx productivity program programming python script todo voodoopad unproductivity.org) [...]

Leave a reply

You must be logged in to post a comment.

Feed, Endorsements & other Links

my bookmarks

© 2005 - 2007 Michael McCracken.

buy cheap levitra cheapest clomid prices viagra sales propecia sale buy cheapest cialis viagra prescription viagra malaysia order clomid online soma pharmacy levitra sale certified cialis buy cheap cialis internet buy lasix without prescription synthroid discount buy viagra online cheap order viagra no prescription required viagra side effects buy viagra buy viagra overnight delivery viagra free delivery buy cialis overnight delivery cost cialis order synthroid online soma online cheap viagra from canada buy viagra in canada soma prescription order cialis from canada order discount cialis online accutane sale viagra overnight delivery generic viagra online purchase cialis without prescription lasix sale cialis cheapest synthroid cialis cheapest price order viagra overnight delivery low cost cialis order no rx cialis cheap viagra from usa clomid find discount viagra accutane purchase acomplia propecia pills viagra cheap soma cheap lasix propecia prices buy cialis internet buy generic synthroid purchase soma online lowest price accutane cialis in australia generic cialis propecia no prescription clomid prescription buy cheapest viagra on line buy synthroid discount viagra no rx cheapest acomplia prices generic soma order viagra no rx buy propecia buy viagra generic cheap cialis tablets discount cialis without prescription order levitra online acomplia without a prescription viagra purchase acomplia online cheap