The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   Applying OmniFocus (http://forums.omnigroup.com/forumdisplay.php?f=51)
-   -   Applescript for Exporting Action/Project to DEVONThink Pro (http://forums.omnigroup.com/showthread.php?t=17459)

millerj 2010-08-20 08:13 AM

Applescript for Exporting Action/Project to DEVONThink Pro
 
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

RobTrew 2010-08-20 02:48 PM

Attachments may prove hard, I think.
(The scripting support for them leaves scope for further development)
There is a helpful thread [URL="http://forums.omnigroup.com/showthread.php?t=5100"]here[/URL].

millerj 2010-08-20 05:47 PM

OF 2 DTPro
 
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?

RobTrew 2010-08-20 11:57 PM

I've just uploaded fresh copies of the [URL="http://bit.ly/OF2DEV"]scripts[/URL] (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 ?

[COLOR="White"]--[/COLOR]

millerj 2010-08-21 05:24 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.[/QUOTE]
This may be because the project title, [QUOTE]"course approval: interdisciplinary Freshman Seminar, Inquiry Seminar—Missing NA"[/QUOTE], 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

RobTrew 2010-08-21 05:53 AM

[QUOTE=millerj;83988]This may be because the project title, , has a colon in it? This appears to be the cause of this problem[/QUOTE]

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
[/CODE]

RobTrew 2010-08-21 09:59 AM

Your helpful feedback has enabled me to post [URL="http://bit.ly/OF2DEV"]updated versions[/URL] 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

[COLOR="White"]--[/COLOR]

endoftheQ 2010-08-31 11:30 AM

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.

RobTrew 2010-08-31 02:48 PM

[QUOTE=endoftheQ;84630]would you be willing to share how you use DevonThink in conjunction with OmniFocus, ie. the pro's-and-con's, etc. [/QUOTE]

This might be the first port of call:

[URL="http://bit.ly/OF-DEV"]http://bit.ly/OF-DEV[/URL]

(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.

[COLOR="White"]--[/COLOR]

Greg Jones 2010-08-31 04:17 PM

[QUOTE=endoftheQ;84630]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.[/QUOTE]

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 [url=http://www.devon-technologies.com/scripts/wordpress/2010/06/devonthink-to-go-1-0-beta-5-seeded/]here[/url]. Note that the wording 'What you cannot do, however,...' is a typo-it should read 'What you [i]can[/i] 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.'


All times are GMT -8. The time now is 01:02 AM.

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