The Omni Group Forums

The Omni Group Forums (
-   OmniOutliner 3 for Mac (
-   -   multi-file export with Automator? (

aez 2006-08-20 08: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:

on run {input, parameters}
set exportDir to "/tmp/opml/"
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

All times are GMT -8. The time now is 03:47 PM.

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