The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniOutliner 3 for Mac (http://forums.omnigroup.com/forumdisplay.php?f=9)
-   -   multi-file export with Automator? (http://forums.omnigroup.com/showthread.php?t=1450)

aez 2006-08-20 07:15 AM

multi-file export with Automator?
 
Is there a way to export multiple documents at once with Automator?

It seems like the filename has to be hardcoded in the export action, which makes it hard to use with several different files at once.

I was hoping that leaving the filename blank would make Outliner figure it out itself. I've got a bunch of outliner files that I want to convert to OPML, so that myfile.oo3 -> myfile.opml.

For now I'm using this applescript where the export action would go:

[CODE]
on run {input, parameters}
set exportDir to "/tmp/opml/"
try
do shell script "mkdir '" & exportDir & "'"
end try
tell application "OmniOutliner"
repeat with doc in input
set s to doc's name
set opmlName to texts 1 thru ((s's length) - 4) of s & ".opml"
set outfile to exportDir & opmlName
export doc to outfile as "OOOPMLDocumentType"
end repeat
end tell
return input
end run
[/CODE]


All times are GMT -8. The time now is 10:36 PM.

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