Fun with VoodooPad/Outlook integration
I mentioned in a previous post that I’ve been using VoodooPad under Mac OS for taking notes. I like the expressiveness of the wiki paradigm for managing my own jumble of meeting notes, random thoughts/ideas and formal preparation for presentations and documents: naturally a corpus that contains a lot of interrelated concepts. But, I also mentioned a lingering love for OneNote. One of the specific capabilities of OneNote that I missed when I switched to VoodooPad is the ability to keep tasks in sync between OneNote and Outlook – this is very important, because I manage my workload and plan my days substantially via Outlook tasks.
Here’s my solution. First, I defined a convention for annotating a line in VoodooPad as a task:
- An incomplete task is a line starting with “[ ]” – open/close square brackets with a space between.
- A task that has been transferred to Outlook is annotated with “[/]” – the space is replaced with a forward slash.
- A completed task is annotated with “[*]“.
Clearly more sophistication is possible here, including annotations for due dates, priorities, categorization (I tag tasks extensively, along with email and appointments – more on that in a later post on my Outlook tagging add-in).
Next, I defined a simple exchange mechanism between Mac OS and Windows. In my Dropbox folder there’s a file imaginatively named “todo.txt” that contains a line per task, including the annotation. Dropbox takes care of file synchronization between the environments.
Finally, I implemented the synchronization with Outlook, in two pieces. First: a Python plug-in for VoodooPad that reads todo.txt, then scans all of my VoodooPad pages for task-annotated lines, adding any missing tasks to the file, and updating any changed annotations in VoodooPad. Second: a Windows console app (that should be a tray icon or maybe even a Windows service) that has a FileSystemWatcher keeping an eye on my Dropbox folder. When todo.txt changes, the app reads the file, adds any “[ ]“-annotated tasks to Outlook and updates these tasks with the “[/]” annotation.
The hard part was implementing updates back into VoodooPad. Figuring out the specific incantations required to manipulate the page content via the PyObjC bridge was a long experimental challenge, ultimately resulting in a process of counting characters line-by-line, creating an NSRange representing the string range to replace (thanks to a FlyingMeat sample), doing a replaceCharactersInRange_withString_ on my AttributedString (thanks to a tutorial on Python’s introspection capabilities), then doing a setDataAsAttributedString_ on the page. Whew.
All I have left to do is catch task state changes (i.e. tasks being marked completed) on the Outlook side and do the appropriate updates to todo.txt, and it should be all set. The obvious weakness with this whole approach is implicitly using the text of the task as the key, but I very rarely, if ever, alter this once a task is created.
UPDATE: A colleague suggested I include this picture illustrating my solution. And I guess I should consider using the todo.txt format for my todo.txt file.
I used to be an avid online note-taker, as you are. But then I realized that my co-workers, and more importantly, my customers thought I was fully multi-tasking (email, coding, etc.). And of course, while the vast majority of the time I was fully engaged, the call of email and IM is sometimes impossible to resist.
So when I joined VistaPrint, rather than continue to take notes online, I exclusively use Notepad — the paper kind.
I’ve decided to face this one head-on, in order to not sacrifice the productivity I know I lose when taking paper notes (I’ve been around this block more than once, and for a long time took notes on paper and scanned them). The machine I use for taking notes in meetings doesn’t have wireless network, which means there’s no temptation to multi-task, and its much easier to send the right linguistic and body language signals that lets your colleagues know you’re fully engaged in the interaction.