My favorite to-do app, The Hit List, is nearly unusable in Monterey. Time to migrate my >10K to-do items!
The app has no export function, and its db is proprietary. However, it is scriptable. And years ago someone built a script to export (painfully step by step) to OmniFocus, which miraculously still works…though it’s clumsy with sub-folders.
I don’t need data to transfer to Omnifocus. Things or Todoist or even Apple Reminders would be just as good. From there, there are ample ways to import into whatever app I wind up using (TickTick is looking pretty good).
As an AppleScript dabbler, this is really over my head, but perhaps someone can fix it easily - or recommend someone I could hire?
Here’s the remarkably simple script:
tell application "The Hit List"
activate
set tasklist to selection
set singleTask to true
if tasklist is not {} then
repeat with theTask in tasklist
set theStart to missing value
set theDue to missing value
set theOmniTask to missing value
set theTitle to the timing task of theTask
set theNotes to the notes of theTask
set theStart to the start date of theTask
set theDue to the due date of theTask
tell application "OmniFocus"
tell default document
set newTaskProps to {name:theTitle}
if theStart is not missing value then set newTaskProps to newTaskProps & {defer date:theStart}
if theDue is not missing value then set newTaskProps to newTaskProps & {due date:theDue}
if theNotes is not missing value then set newTaskProps to newTaskProps & {note:theNotes}
set newTask to make new inbox task with properties newTaskProps
end tell
end tell
end repeat
end if
end tell
It works well, albeit slowly, but it does not properly handle folders or subfolders in lists (and I should note that The Hit List supports near-infinite subfolders of subfolders).
For example, if I select all items here:
….the import will look like this in Omnifocus:
….even though Omnifocus can accommodate subfolders, like this:
Also: if I run the script when a folder is collapsed in The Hit List, it only exports the top-level folder name, with no subfolder data. So in the example above, if Task 3 was not expanded in The Hit List, the result in Omnifocus would be:
Task 1
Task 2
Task 3
Task 6
Task 7
Task 8
So I need the script to be a bit smarter!
If the script needs to cheat by expanding all selected folders (and sub-folders) before exporting (and adding the newly-revealed sub-items to the selection), that would be ok. Note that the Hit List offers an “Exand All” command in View>Outline>Expand All (keyboard shortcut: Command/Control/Down-Arrow).
One non-obvious thing: The Hit List also has a notes field. The script does correctly import this data, but I just wanted to let you know about it. Here is an example of a note:
A demo version of The Hit List is available here
A demo version of Omnifocus is available here
Thanks for any advice!
Model: Mac Mini
AppleScript: 2.11
Browser: Safari 605.1.15
Operating System: macOS 12