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 1 for Mac
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
"Bridging" work and home with synchronization filters Thread Tools Search this Thread Display Modes
I'm not sure if this is possible or not--which is why I'm posting here.

I want to have a "drop box" that I can use to synchronize projects and tasks between home and work. I imagine this working as a @Home category at work, and an @Office category at home. Tasks and projects in those categories (and ONLY those categories) are synchronized to a WebDAV server, and end up in the Inbox on the other end.

Is this possible?


Long explanation:

I run OmniFocus at home and now at work and I would like to be able to synchronize the two. I subscribe to David Allen's advice of having one single, trusted system for both work and personal lives. HOWEVER, I work for the government, and using government resources (and therefore taxpayer dollars!) to manage personal projects is not just a bad idea--it's against the law. I.e, jail time. Unlikely to happen for sure, but I'd rather stay on the right side of that line just in case.

By having a drop box between the two I can easily transfer personal tasks captured at work into my personal environment. But it is also important that I restrict what's synchronized to just what's in the @Home categories as transmitting work information onto a non-government computer would also be illegal.

I imagine this working as a set of filters for synchronization and two WebDAV servers. At work, for example, I'd have a filter that would select only @Home tasks and projects for synchronization with the first WebDAV account (which ends up in the Inbox of my personal OmniFocus). Another filter would take everything from the second WebDAV account (which came from @Office in my personal OmniFocus) and stick it in my office Inbox. Vice-versa for the personal OmniFocus at home.
 
OmniFocus doesn't have built-in features that support this, I'm afraid.

The best I can imagine is the following:
Use the default database for your "home" tasks and items. That's the only database that OmniFocus will synchronize with.
(It's the one located at ~/Library/Application Support/OmniFocus/, btw.)

Your work machine has a second OmniFocus database, located somewhere else on that machine. To make this second database, just use the finder's Duplicate command, then move the copy, give it a new name, and delete the contents. You now have someplace to store your various work-related actions with no risk of syncing them to the home machine.

It's theoretically possible to handle moving actions between the two databases on your work machine with some sort of AppleScript, but then you have to worry about accidentally using the script on something you didn't actually want to sync.

If a mistake meant jail time, the approach I would take would be to make a "work stuff" single-action list in my Home database, and then manually type tasks into that list. OmniFocus then syncs that new task to the home machine just like any other.

True, you need an additional "I did this" action to remind you to check it off in the un-synced database when you do something at home, but to my mind that's a small price to pay for staying out of prison. :-)
 
Isn't even capturing personal tasks on a government computer stepping over the line? If you're determined to be squeaky clean, I would think the only reasonable answer is that you don't put your personal stuff on your work computer.

If it is okay to capture personal tasks en route to moving them home, and vice versa, you could probably do something with the support for processing email into actions. An Applescript could be run against the contents of the @home context while at work that went through and generated a mail message to create that same action on your home machine (see "processing mail messages into actions" in the OmniFocus help function for the details). When you get home and fire up the Mail app, it processes those emails into the corresponding actions and stuffs them into your OmniFocus database. For simplicity, you'd probably want to delete those actions from the source system the next day before adding any new ones to the transfer context. The script would be written so it only processed the actions that you selected before invoking it, and from what I recall of playing around with generating outgoing Mail via Applescript, it could be set up so that it just generates the message, but doesn't actually send it, so you had the final approval.
 
Thank you, Brian.

It's a shame OmniFocus doesn't support this. I'd imagine others would be interested in a "drop box" as well, not just government workers. I corporate worker, for example, might not want to synchronize his or her start-up ideas and todo items onto their work computer, for example.

EDIT @whpalmer4: There's a contingency in the contract I signed that allows for limited "reasonable use" of government resources for non-work related activities (checking personal email during lunch breaks and off-hours is what it was originally intended for, I would guess). I think it's safe to interpret capturing personal tasks as falling in the same category as checking email, but organizing your entire personal life on a government machine is certainly crossing the line.

I don't deal with anything classified, so I don't think there is any serious risk of repercussion, but in government it's always good to be squeaky clean, especially the higher up you get.

Nice suggestion with the personal tasks and email filters. I think that's what I'll do.
 
I felt like fooling around with Applescript a bit, so I coded up a rough script to do as I suggested. Known limitations:

1) because of a bug in OmniFocus, I don't include the time in a start or due date -- OmniFocus sees the ":" in the time and gets confused. Bug report filed.
2) I don't make any attempt to preserve any hierarchical structure.
3) If you run it against actions in the Inbox, any assigned project name will be lost

It is likely that all requests for enhancement will be met with a response of "you know where the sources are, it's a good learning and character-building exercise" :-)

Code:
property DestinationEmailAddr : "someuser+omnifocus@gmail.com" -- your address goes here
property SendEmailAutomatically : true -- set to false if you want to have opportunity to verify email before sending

global msgContent

tell application "OmniFocus"
	tell front document
		tell (first document window whose index is 1)
			set theSelectedItems to selected trees of content
			set numItems to (count items of theSelectedItems)
			if numItems is 0 then
				display dialog "No tasks selected" buttons "OK"
				return
			end if
			set mailMsg to my setupEmail(DestinationEmailAddr)
			set selectNum to numItems
			repeat while selectNum > 0
				set selectedItem to value of item selectNum of theSelectedItems
				my processActionToEmail(selectedItem, mailMsg)
				set selectNum to selectNum - 1
			end repeat
			my completeEmail(mailMsg, SendEmailAutomatically)
		end tell
	end tell
end tell


on setupEmail(destinationAddress)
	tell application "Mail"
		set newmsg to make new outgoing message with properties {visible:not SendEmailAutomatically, subject:" "}
		tell newmsg
			make new to recipient at end of to recipients with properties {address:destinationAddress}
		end tell
		set msgContent to ""
		return newmsg
	end tell
end setupEmail

on completeEmail(msg, sendOrNot)
	tell application "Mail"
		tell msg
			set content to msgContent
			if (sendOrNot) then
				send msg
			end if
		end tell
	end tell
end completeEmail

on processActionToEmail(selectedItem, msg)
	tell application "OmniFocus"
		set theName to name of selectedItem
		set theProject to containing project of selectedItem
		set theContext to context of selectedItem
		set theStartDate to start date of selectedItem
		set theDueDate to due date of selectedItem
		set theDuration to estimated minutes of selectedItem
		set theNote to note of selectedItem
		set theFlagged to flagged of selectedItem
		
		set theNameStr to theName
		if (theFlagged) then
			set theNameStr to theNameStr & "!"
		end if
		
		if (theProject is not missing value) then
			set theProjectStr to ">" & name of theProject
		else
			set theProjectStr to ""
		end if
		
		if (theContext is not missing value) then
			set theContextStr to "@" & name of theContext
		else
			set theContextStr to ""
		end if
		
		-- if only one date, it is the due date (#due)
		-- if two dates, #start#due
		-- to send start date only, send #start#
		
		-- to work around an OmniFocus bug where it fails if there is a ":" in the date/time, we just use the date
		-- when OmniFocus is fixed, simply remove "short date string of" wherever it occurs in this routine
		
		if (theStartDate is not missing value) then
			set theStartDateStr to "#" & short date string of theStartDate
		else
			set theStartDateStr to "#"
		end if
		if (theDueDate is not missing value) then
			set theDueDateStr to "#" & short date string of theDueDate
		else
			set theDueDateStr to "#"
		end if
		
		if (theDuration is not missing value) then
			set theDurationStr to "$" & theDuration & " minutes"
		else
			set theDurationStr to ""
		end if
		
		theNote
		if (theNote is not "") then
			set theNote to "//" & theNote
		else
			set theNote to ""
		end if
		
		set theActionStr to "--" & theNameStr & theProjectStr & theContextStr & theStartDateStr & theDueDateStr & theDurationStr & theNote & "
"
		
		set msgContent to msgContent & theActionStr
	end tell
end processActionToEmail
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Omnifocus cannot start synchronization server" smart_object Bonjour sync 1 2011-10-05 05:28 PM
I don't get "Available" and "Next Actions" filters - please help michaeltdoan OmniFocus for iPhone 4 2011-04-05 11:24 PM
"Home-Button" inside Omnifocus? hermann OmniFocus for iPad 3 2010-07-31 10:46 AM
"Work Day Hours" and "Work Week Days" in General Preferences dhm2006 OmniFocus 1 for Mac 2 2007-09-05 01:50 PM


All times are GMT -8. The time now is 07:22 AM.


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