I’m trying to be more organized at work. I tried out OmniFocus for its trial period and liked it, but $80 is a bit steep. I also wanted a bit more functionality; specifically, for some tasks I want to include notes and thoughts and references. So I turned to DEVONthink Pro Office, which I already use extensively for organizing documents and notes.

I created a new database, “Todo”. I organized it with folders according to areas (e.g., “Life”, “Work”) and sub-areas (e.g. project names under “Work”). For each task, I make a new RTF document whose title is the task; if I want to add more details, I put them in the body of the task.

To replicate OF’s contexts, I simply use tags. What about finishing a task? I add the tag done and move it to a top-level “Done” group (more about automating this shortly).

So far, so good. But OmniFocus has the nice feature of being able to view all of your tasks at once. DEVONthink can do the same with a Smart Group. Data→New→Smart Group makes one, with the simple search of “[Tag] [is not] [Done]”. I call the smart group “All tasks”. I also made one called “All work tasks” with the same search but limited to the top-level “Work” group. I also turn on the “Location” column in the document list and move it to the leftmost position so I can easily sort tasks by what category they’re in.

OF view in DTP

The last thing (so far) is automation. When I finish a task, I want it to be moved to the top-level “Done” group so it’s out of the way, but I do want to know where it originally came from and when I completed it. This required a little bit of Applescript, which I bind to ctrl-D; it adds a tag “Done”, a tag for the current date, a tag for the original location of the task (e.g., “Work/Cool project”), and moves the task to the top-level “Done” group.

-- Mark as done: apply the "done" tag, a tag for the current date, and move this item to the "Done" folder in the current group.
tell application "DEVONthink Pro"
  try
    set r to the content record
    set t to the tags of r
    if "Done" is not in t then set t to t & {"Done"}
    set t to t & {do shell script "date +%F"}
    set t to t & {characters 2 thru -1 of (the location of the current group & the name of the current group) as string} -- Tag with origin group
    set the tags of r to t
 
    set done_group to create location "/Done"
    move record r to done_group
 
  on error error_message number error_number
    if the error_number is not -128 then display alert "DEVONthink Pro" message error_message as warning
  end try
end tell

Finally, as a bonus, I wanted to experiment with setting priorities on items. I made six nearly-identical Applescripts, which I bound to ctrl-1 through ctrl-5 and ctrl-0 (to remove the priority):

tell application "DEVONthink Pro"
  try
    repeat with r in (the selection as list)
      set old_tags to the tags of r
      set new_tags to {}
      repeat with t in old_tags
        if t is not in {"1", "2", "3", "4", "5"} then set new_tags to new_tags & {t}
      end repeat
 
      -- Change the "1" to the desired priority for each script;
      --   comment out the following line to remove the priority.
      set new_tags to new_tags & "1"
      set the tags of r to new_tags
    end repeat
  on error error_message number error_number
    if the error_number is not -128 then display alert "DEVONthink Pro" message error_message as warning
  end try
end tell