The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniFocus > OmniFocus Extras
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Script: FoldingText to OmniFocus Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
FoldingText is a very quick and fluid outliner (in the Markdown idiom, with a powerful XPath-modelled filtering engine beneath the hood, and a scripting interface to use it with).

I find it an unusually good environment in which to think and write, and in which to quickly outline and reorganise a project before committing it to OmniFocus.

Here is an early draft of a script which exports a sub-tree from FoldingText to OmniFocus, avoiding any duplication, and reporting (through Growl or an Applescript dialog) on the existing matches which it has found, and on any new Folders, Projects and Tasks which it has created in OmniFocus.

  • In FoldingText, place your cursor in the first line (the top level line) of the outline which you wish to export to OmniFocus,
  • run this script,
  • and exercise a little patience creating tasks through Applescript works well, but can never be fast.
  • In a while, a report will appear

Which levels of the FoldingText outline will be treated as folders, and which as projects and tasks ?

The first line in the outline which ends with FoldingText's special .todo tag will be interpreted as a project. Any ancestors of this line will become nested folders in OmniFocus, and any descendants will become nested tasks.

Outlines which contain no .todo tag will be interpreted as projects - the top level line will be exported as a project, and its descendants as nested tasks.

Non-duplication. The script checks to see whether the outline, or part of it, is already in OmniFocus. If it finds any existing matches, it will add any new material, but will not duplicate. The report at the end gives counts of objects found and created.
For reasons internal to the OmniFocus Applescript interface, when the script is updating an existing set of nested tasks in OmniFocus, any existing task which gets new children will initially be collapsed rather than expanded in the GUI, so you may not immediately notice the new additions :-)
Very much a first draft, so test it cautiously with toy data, until you get a sense of how it works. Bug reports and suggestions welcome.
  • I have updated this script to a version which also offers exports to OmniOutliner or OmniGraffle, so it now starts with a menu of three export targets.
  • Anyone who prefers to disable the menu and make three separate copies (giving each, for example, a different key assignment in Keyboard Maestro) can first edit pblnMenu, near the top of the script, to false, and then set plngTarget to one of the three appropriate values. (See below).

property plngOFOC : 0 -- OmniFocus
property plngOOut : 1 -- OmniOutliner
property plngOGfl : 2 -- OmniGraffle

property pblnMenu : true -- IF FALSE, SKIPS MENU AND EXPORTS TO APP indicated by plngTarget (below)
property plngTarget : plngOOut
The current version is in a Github repository.


Last edited by RobTrew; 2012-12-25 at 03:49 PM.. Reason: Ver 018 - Link to Github version

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Script: Pasting from FoldingText Markdown to oo3 nesting and columns RobTrew OmniOutliner 3 for Mac 5 2014-05-11 11:34 AM
Copy OmniFocus selection in FoldingText format RobTrew OmniFocus Extras 2 2012-12-08 05:36 AM
Draft Script: Save as FoldingText RobTrew OmniOutliner 3 for Mac 2 2012-10-31 02:14 PM
Script: Export from a FoldingText outline to OmniOutliner RobTrew OmniOutliner 3 for Mac 0 2012-10-04 01:46 PM
Script: Export from FoldingText outline to OmniGraffle diagram RobTrew OmniGraffle General 0 2012-10-04 01:44 PM

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

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