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)
-   -   Multiple file export via Applescript (http://forums.omnigroup.com/showthread.php?t=6585)

braindump 2008-01-05 07:15 AM

Multiple file export via Applescript
 
I noticed some talk elsewhere in this forum about using AppleScript to automate exporting multiple OO files. I'm new to OS X and haven't even looked at AppleScript yet, so I was wondering if anyone has an export script they'd be willing to share with me to help get me started.

I just got OO Pro this week and already see that it is the perfect application for a specific documentation project I'm working on. I'm annotating about 120 wireframes for a website. The wireframes are done as separate canvases in an OmniGraffle file, organized as a sitemap, and exported as an HTML image map. I'd like to maintain all of my notes on a per-page basis in OO (one OO file per wireframe page), and export them in bulk to dynamic HTML each time the sitemap is published. At that point I'd use a shell script to append each dynamic HTML file to its corresponding output wireframe page (the HTML file containing the image map for the specific page).

The shell script to combine the sets of files is easy enough, I'm just looking for a head start on automating outputting the 120 OO files to dynamic HTML.

Any help you can provide will be greatly appreciated. Let me know if you have any other ideas for doing this more elegantly.

DerekM 2008-01-10 01:40 PM

Hi, sorry for not seeing this sooner, here's a script that will export all currently open files to a specified folder:

[CODE]set text item delimiters to ".oo3"
tell application "OmniOutliner Professional"
tell application "Finder"
set thePath to (choose folder with prompt "Select folder to export to")

end tell

repeat with myDoc in every document

set docName to name of myDoc
set docName to text item 1 of docName

--change "com.omnigroup.OmniOutliner.HTMLExport/HTML (Dynamic)" to change export type
--"writable document types" will list acceptable file types
save myDoc as "com.omnigroup.OmniOutliner.HTMLExport/HTML (Dynamic)" in ((thePath as string) & docName)

end repeat

end tell
set text item delimiters to ""[/CODE]

braindump 2008-01-12 04:27 PM

Hey, thanks a bunch!


All times are GMT -8. The time now is 11:21 PM.

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