Since The Hit List finally reached 1.0, I decided to take another look at it. I already had a license, although I haven’t used it for a long time. One thing keeping me from using it was all of my projects & tasks that I have in OmniFocus.
I wrote this AppleScript to get my tasks from OmniFocus into The Hit List. It’s still a work in progress & has some limitations, like not supporting nested tasks & not importing the context for tasks. You can download the script here.
property myfolder : ""
property currentList : ""
on exportOneTask(thing)
tell application "OmniFocus"
if thing is not completed then
set nm to (name of thing)
set sd to start date of thing
set dd to due date of thing
set ct to the context of thing
set nt to note of thing
if ct is not equal to missing value then
nm = nm & " @" & (name of ct)
end if
tell application "The Hit List"
set props to {timing task:nm, notes:nt}
if sd is not equal to missing value then
set props to props & {start date:sd}
end if
if dd is not equal to missing value then
set props to props & {due date:dd}
end if
tell currentList to make new task with properties props
end tell
end if
end tell
end exportOneTask
on exportList(thing)
set nm to (name of thing)
tell application "The Hit List"
tell myfolder to set currentList to make new list with properties {name:nm}
end tell
tell application "OmniFocus"
repeat with t in (tasks of thing)
my exportOneTask(t)
end repeat
end tell
end exportList
on exportFolder(thing)
set nm to (name of thing)
tell application "The Hit List"
tell selected group to set myfolder to make new folder with properties {name:nm}
end tell
tell application "OmniFocus"
repeat with p in (projects of thing)
if p is not completed then
my exportList(p)
end if
end repeat
end tell
end exportFolder
tell application "OmniFocus"
-- set docSource to default document
my exportFolder(default document)
repeat with f in (folders of default document)
my exportFolder(f)
end repeat
end tell