The Omni Group Forums

The Omni Group Forums (
-   OmniOutliner 3 for Mac (
-   -   Draft Script: Save as FoldingText (

RobTrew 2012-10-30 05:25 PM

Draft Script: Save as FoldingText
1 Attachment(s)
Here's a first sketch of a script for saving from OmniOutliner3 to the format of the [URL=""]FoldingText[/URL] plain text outliner.

From FoldingText, one can apply CSS stylesheets with [URL=""]Marked[/URL] for further migration to well-formatted HTML, PDF etc.

FoldingText adopts a number of the Markdown conventions, so there is an option (adjustable in the properties at the start of the script) for flagging the top N levels of an OmniOutliner outline as Markdown headers (starting with a hash).

FoldingText also allows us to flag particular outline nodes as 'Code', 'Quotation' etc. In case you want to do this in OmniOutliner before exporting, I've included an additional script which creates a popup column in OO3, which you can use to flag the type of particular nodes in your outline.

(This should really be written as a a Save As plugin (XSL template), but for the moment this first Applescript sketch does at least make it possible to experiment with the basic approach. Bug reports and suggestions welcome).


RobTrew 2012-10-31 06:39 AM

Updated (above) to warn and exit if the .oo3 file itself has not yet been saved.

RobTrew 2012-10-31 02:14 PM

Updated again (above, 016) to look for uses of **bold** and *italic/oblique* fonts in OO3 rich text and translate these into the Markdown emphasis conventions used by FoldingText.

This behaviour can be disabled by editing the following two properties, near the the top of the script, to [I]false[/I]:

[CODE]property pblnTopicEmphasis : true
property pblnNoteEmphasis : true[/CODE]

All times are GMT -8. The time now is 12:19 AM.

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