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)
-   -   Draft Script: Save as FoldingText (http://forums.omnigroup.com/showthread.php?t=26704)

RobTrew 2012-10-30 04: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="http://www.foldingtext.com"]FoldingText[/URL] plain text outliner.

From FoldingText, one can apply CSS stylesheets with [URL="http://markedapp.com"]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).

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

RobTrew 2012-10-31 05:39 AM

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

RobTrew 2012-10-31 01: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 06:06 AM.

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