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

 
Applescript for Exporting Action/Project to DEVONThink Pro Thread Tools Search this Thread Display Modes
I'm looking for a simple applescript that will export an OF action (with notes, attachments, I guess) to DEVONThink Pro. I've seen Rob Drew's scripts, but they (1) seem like using a sledge hammer for killing a fly, and (2) they don't work for me.

Are there other alternatives out there?

Jason
 
Attachments may prove hard, I think.
(The scripting support for them leaves scope for further development)
There is a helpful thread here.
 
Rob - Thanks for the reply. So attachments may prove difficult - I can do without them. I just need a simple 'OF action' to 'DTPro Inbox item' script. Your seem promising, but I just can't get them to work.

Surely, there's something more straight forward. Maybe an Automator action?
 
I've just uploaded fresh copies of the scripts (with a fix for an issue involving textless tasks in Save2DevonAsTXT).

They seem to be working fine on my system (10.6, OF 1.8, Dev Pro 2.0.3) from the OmniFocus toolbar.

Remember that you only have to select the top level folders/projects/action groups that interest you - all/any children will be exported with them.

What difficulty do you seem to be encountering ?

--

Last edited by RobTrew; 2010-08-21 at 12:43 AM..
 
Rob,

Thanks for your interest in how the scripts perform for me. The first thing I did when I saw you'd updated your scripts was to download them and try them without modification. To my great pleasure, they worked, both from inside OF and from the AppleScript editor.

Then they started started to fail. For the record, I'm running DTPro Office 2.0.3, OF 1.7.5, and OS X 10.6.4.

Here are the types of failure messages I'm getting.

The scripts do not work on any of the contents of the OF Inbox, it does not work on a "!Single Tasks" project (perhaps because of the leading '!'?). I get no error message and no script output.

I also run across this problem:
Quote:
The document “Untitled” could not be saved as “ interdisciplinary Freshman Seminar, Inquiry Seminar—Missing NA.oo3”. The file doesn’t exist.
This may be because the project title,
Quote:
"course approval: interdisciplinary Freshman Seminar, Inquiry Seminar—Missing NA"
, has a colon in it? This appears to be the cause of this problem.

These problems are minor, I guess. My initial dissatisfaction arose from the script failures on the OF Inbox.

Hope this information is interesting or helpful to you.

Jason
 
Quote:
Originally Posted by millerj View Post
This may be because the project title, , has a colon in it? This appears to be the cause of this problem
Thanks, that's helpful, and I'll take a look at it.

In the meanwhile, if you want to experiment with something very simple, you could start with a draft like this:

(Even this had to be amended to purge any colons from the file name :-)

Code:
property pstrAppSupport : (path to application support from user domain as string)

tell application id "com.omnigroup.omnifocus"
	set oWin to front document window of front document
	
	set lstObjects to value of selected trees of content of oWin
	set strText to ""
	repeat with oObject in lstObjects
		set strText to strText & "- " & name of oObject & return
		set strNote to note of oObject
		if strNote is not "" then set strText to strText & strNote & return
	end repeat
end tell

--tell application id "com.apple.finder" to set the clipboard to strText

tell application id "com.apple.TextEdit"
	set strName to first paragraph of strText
	
	-- PURGE COLONS (FILE SYSTEM SEPARATORS) FROM FILE NAME
	set my text item delimiters to ":"
	set lstParts to text items of strName
	set strName to ""
	repeat with oPart in lstParts
		set strName to strName & oPart & space
	end repeat
	set my text item delimiters to space
	
	set strName to strName & ".txt"
	set oDoc to make new document with properties {text:strText, name:strName}
	save oDoc in pstrAppSupport & "DEVONthink Pro 2:Inbox:" & strName
	close oDoc
end tell

Last edited by RobTrew; 2010-08-21 at 06:29 AM.. Reason: Code amended to purge ":" from file names
 
Your helpful feedback has enabled me to post updated versions of the Save2DevonAsOO3 and Sav2DevonAsTXT scripts, enabling export of inbox items, and of objects with names which include colons, or which have no names.

(I haven't found any difficulty with object names starting with, or including, exclamation marks).

Rob

--
 
Rob,

I have an old copy of DevonThink Pro Office, it came with a ScanSnap. I tried it out and didn't find it particularly user-friendly. I've seen that v.2 is out along with an eBook and I'm happy to dole out $60 and spend some time learning but I'm unsure of the benefits. I just wondered, if-and-when you might have a spare few minutes, would you be willing to share how you use DevonThink in conjunction with OmniFocus, ie. the pro's-and-con's, etc. It would be great to get an overview from a committed GTD'er.

Thanks in advance.
 
Quote:
Originally Posted by endoftheQ View Post
would you be willing to share how you use DevonThink in conjunction with OmniFocus, ie. the pro's-and-con's, etc.
This might be the first port of call:

http://bit.ly/OF-DEV

(These scripts will probably evolve in the next few months, as I am beginning to change the way in which I use folders in OF, and would like to be able to reorganize them regularly, while maintaining links between OF projects and associated files in DT2 ...)

What I most appreciate in DT2 is being able to search across a large body of related files as if they were a single database, and, in the case of PDFs and TXTs, to see the search matches inside the files, without having to open them. Integrated OCR is also very helpful for my particular areas of work.

--

Last edited by RobTrew; 2010-08-31 at 02:54 PM..
 
Quote:
Originally Posted by endoftheQ View Post
I just wondered, if-and-when you might have a spare few minutes, would you be willing to share how you use DevonThink in conjunction with OmniFocus, ie. the pro's-and-con's, etc.
I cannot go into details while the product is still in beta, but take a look at Eric's comment #23 on the DEVONthink blog located here. Note that the wording 'What you cannot do, however,...' is a typo-it should read 'What you can do, however, is add x-devonthink-item: links to any application of your choice, e.g. OmniFocus, and use these links on the device to directly show the linked document.'
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
setting project + context via script (modifying a DEVONthink script) bernd OmniFocus Extras 2 2012-09-08 12:10 PM
Creating a dated OF action with links to DevonThink record(s) RobTrew OmniFocus Extras 0 2011-02-13 01:21 PM
Applescript -- Move project or action to: ??? darrenburgess OmniFocus 1 for Mac 1 2010-01-18 07:05 AM
Exporting to OPML using AppleScript atobe OmniOutliner 3 for Mac 5 2008-05-30 02:11 AM
OmniWeb Applescript Support (for DevonThink) dougray OmniWeb General 8 2006-11-03 08:21 AM


All times are GMT -8. The time now is 01:48 PM.


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