Saving a FoldingText 2 Outline as a .docx MS Word file
This script is an Applescript wrapper for FoldingText 2 which calls:
-
Fletcher Penney’s MultiMarkdown, and
-
John MacFarlane’s Pandoc.
Installation
-
Install Pandoc from http://johnmacfarlane.net/pandoc/installing.html
-
In Terminal.app, check the path of the pandoc command by entering the command:
type -a pandoc
-
In the Applescript, check the property
pstrPandoc
(near the top of the script), and edit its value, if necessary, to match the path returned bytype -a pandoc
e.g:property pstrPandoc : "/usr/local/bin/pandoc"
-
Install MultiMarkdown from http://fletcherpenney.net/multimarkdown/install/#macosx
-
In Terminal.app, check the path of the pandoc command by entering the command:
type -a multimarkdown
-
In the Applescript check that the property
pstrMMD
(near the top of the script), and edit its value, if necessary, to match the path returned bytype -a multimarkdown
e.g:property pstrMMD : "/usr/local/bin/multimarkdown"
You can then run the script from something like KeyBoard Maestro or FastScripts
-
Hash headers level 1 to N in your FoldingText document will become MS Word outline Heading Levels 1 to N
-
Indented list items will be correspondingly indented
-
The document can be further styled by changing the MS Word theme.
Alternatively, to export from FoldingText to MS Word in a way that directly applies CSS stylesheet formatting, and also offers formatted PDF exports, try Brett Terpstra’s excellent marked2.app