The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniFocus > OmniFocus Extras
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Things to OF importer Thread Tools Search this Thread Display Modes

1 - Back up your things database and back up your OF database
2 - Open both applications
3 - In OF revert back to the default database (so you can see exactly what my script imports)
4 - Run the script and see what happens (there are some great tutorals on the web for learning how to run and edit an apple script if you need help in that area)

My script imports your projects across. It moves tasks inside of areas without projects, to an OF project named after the Area (thanks Kimomni). It does not put the projects inside an area folder (this would be nice). It looks for tags with an @ in front like @Home and @Mac and assigns a context in OF. In all it should do most of the work for you.

Once you have a good feel from steps 1-4 above restore your old OF database and run the script again to add your Things data to any existing OF data you have.

Hope this helps. Let me know how it goes.
Originally Posted by whpalmer4 View Post
The underlying problem seems to be that the importer is broken -- I'm not able to get it to understand start/due dates or durations. I've filed a report.
It turns out that if you set the column type in OmniOutliner to date, the dates will be successfully imported, otherwise they will be inserted into the notes field as metadata. Why that is necessary when OmniFocus has been told that a certain column is a date, I can't say. I retract my previous claim that the importer is broken with respect to dates, and wish to substitute an assertion that someone needs to either document this shortcoming or remove it :) Durations, however, are still broken. Either nothing comes across (for example, if you have a fractional hour), or the units are wrong (1h in the OO doc becomes 1m in the OF doc).

This has very little to do with the Things->OF importer script as it currently stands, but is provided for completeness if someone finds this thread while searching for information on importing into OF...
It might be worth taking a look at this post:
Hello everybody!

I tried to use the applescripts in this thread to migrate all my projects and task from things to OF. The script works as expected except from 2 things:

- dates are not taken over
- tags are not taken over

what could i be doing wrong? do all the tags have to have @ in front for the script to work? can i change the script so it can work with tags without @s. I do have more than 60 different tags and don´t want to change every tasks tags manually (which would be hundreds of changes)???

all of my tasks and projects do have due dates but the corresponding fileds in OF stay empty after running the script? Is there any setting i have to change in the script?

thanks for your answers and the scripts in advance.
Hi — thanks to "A to the B" for his Things —> Omnifocus script.

I tweaked it a little bit to preserve creation date, start date, and due date.
Hope this is helpful!

This is the second migration for my 200+ item todo list in the past month!

I finally gave up on The Hit List due to lack of responsiveness from the developer + major duplication bugs syncing with iCal.

I tweaked someone else's script to move everything into Things, which I had bought around version 1.0 but found inflexible and easy to lose things in. My old impression was confirmed once again (though I liked the iPhone app), so I decided to try OmniFocus. We'll see (9 days left on trial) but looking good so far.

Anyhow, here are the script additions. Perhaps someone else can do whatever tag support is needed? I didn't really use them for the short time I was using Things.

Good luck!

-- Import tasks from Things to OmniFocus

-- Added: creation date, due date, start date functionality

tell application "Things"
	-- Loop through ToDos	in Things
	repeat with aToDo in to dos of list "Next"
		-- Get title and notes of Things task
		set theTitle to name of aToDo
		set theNote to notes of aToDo
		set theCreationDate to creation date of aToDo
		set theDueDate to due date of aToDo
		set theStartDate to activation date of aToDo
		-- get dates
		if (creation date of aToDo) is not missing value then
			set theCreationDate to creation date of aToDo
			set theCreationDate to today
		end if
		if (due date of aToDo) is not missing value then
			set theDueDate to due date of aToDo
		end if
		if (activation date of aToDo) is not missing value then
			set theStartDate to activation date of aToDo
		end if
		-- Get project name
		if (project of aToDo) is not missing value then
			if (area of aToDo) is not missing value then
				set theProjectName to (name of project of aToDo)
			end if
		else if (area of aToDo) is not missing value then
			set theProjectName to (name of area of aToDo)
			set theProjectName to "NoProjInThings"
		end if
		-- Get Contexts from tags
		-- get all tags from one ToDo item...
		set allTagNames to {}
		copy (name of tags of aToDo) to allTagNames
		-- ...and from the project...
		if (project of aToDo) is not missing value then
			copy (name of tags of project of aToDo) to the end of allTagNames
		end if
		-- extract contexts from tags
		copy my FindContextName(allTagNames) to theContextName
		-- Create a new task in OmniFocus
		tell application "OmniFocus"
			tell default document
				-- Set (or create new) task context
				if context theContextName exists then
					set theContext to context theContextName
					set theContext to make new context with properties {name:theContextName}
				end if
				-- Set (or create new) project
				if project theProjectName exists then
					set theProject to project theProjectName
					set theProject to make new project with properties {name:theProjectName}
				end if
				-- Create new task
				tell theProject
					set newTask to make new task with properties {name:theTitle, note:theNote, containing project:theProject, context:theContext, creation date:theCreationDate}
					if (theStartDate is not missing value) then set the start date of newTask to theStartDate
					if (theDueDate is not missing value) then set the due date of newTask to theDueDate
				end tell
			end tell -- document
		end tell -- OF application
	end repeat -- Main loop
end tell -- Things application

-- Get context from array of Things tags
on FindContextName(tagNames)
	-- Example usage
	--FindContextName("@Mac", "1/2hr", "High") -- FYI, my tags are context, duration and priority
	repeat with aTagName in tagNames
		if aTagName starts with "@" then
			return aTagName
		end if
	end repeat
	return ""
end FindContextName -- End FindContextName

-- Remove the CRs from a string,
-- not used in this script,
-- carry over from prior implementation
on ReplaceText(find, replace, subject)
	-- Example usage
	-- ReplaceText("Windows", "the Mac OS", "I love Windows and I will always love Windows and I have always loved Windows.")
	set prevTIDs to text item delimiters of AppleScript
	set text item delimiters of AppleScript to find
	set subject to text items of subject
	set text item delimiters of AppleScript to replace
	set subject to "" & subject
	set text item delimiters of AppleScript to prevTIDs
	return subject
end ReplaceText -- End replaceText()
Hi guys. The script worked like a charm for me...except it didn't transfer the Things "logbook". How do I get all that info into Omnifocus? Thanks.
Thanks for the script (right above this post) but it's not working properly.
It won't differentiate between Projects. Everything is imported to the Project "NoProjInThings".
Ok - it's not too bad because I was going to sort it again. But the problem is - that the import stopped after approx. 15 minutes with the following error message:
error "„OmniFocus“ hat einen Fehler erhalten: missing value kann nicht in Typ rich text umgewandelt werden." number -1700 from missing value to rich text
In English: OmniFocus received an error: missing value can't be transformed into the type rich text.

And it stopped :o(
FWIW a first draft of a script which takes another approach:
  • Projects and single actions are imported from THINGS to a date-stamped folder in OmniFocus.
  • The Things tag tree is imported as an OmniFocus context tree,
  • Things delegations are assigned as OmniFocus (people) contexts,
  • Things duration tags (sub-tags of "⨀", of the form [N]m or [N]h) are converted to OmniFocus durations,
  • and other THINGS tags are prefixed by @ and added to names of Projects/Actions in the style of Taskpaper.
  • Items tagged with "High" in Things are flagged in OmniFocus.


Last edited by RobTrew; 2010-12-11 at 02:49 PM..
Originally Posted by RobTrew View Post
FWIW a first draft of a script which takes another approach:
I tried this script. Where should I send bug reports? Most the bugs I encountered were in handling special characters that the terminal didn't like (or maybe those problems were just bugs in the output log on the terminal??)
Thanks for testing it.
I understand that another user has taken this script up and improved it, and that its descendant may appear on github soon (I'm afraid I never really had much Things data to test it with :-)

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
I Really Messed Things Up [Support Ninjas helped fix things, tho. :-)] jpkeppel OmniFocus 1 for Mac 2 2011-05-10 10:26 AM
AS - importer for xmind - in progress johnjj OmniFocus Extras 20 2010-08-25 10:28 PM
AS - importer for MLO (mylifeorganized) johnjj OmniFocus Extras 7 2009-12-24 08:24 AM
Birthday Importer JoaoPinheiro OmniFocus Extras 3 2008-11-13 10:30 AM
Life Balance Importer sprugman OmniFocus Extras 11 2008-01-08 08:04 PM

All times are GMT -8. The time now is 09:23 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2021, vBulletin Solutions, Inc.