×

OmniFocus: Export Selected Tasks to Craft as TaskPaper

This shortcut will export the contents of the selected OmniFocus tasks in TaskPaper format to the Craft application.

DOWNLOAD SHORTCUT

Video 1: Export Selected Tasks to Craft as TaskPaper
Exports the contents of the selected tasks in TaskPaper format to the Craft application.

 1  “Open App” action • Make OmniFocus the active application.

 2  “Omni Automation Script” action • The OmniFocus version of this action.

 3  Omni Automation Script • An asynchronous wrapper function that first checks for one or more selected tasks.

 4  Omni Automation Script • Copy the selected tasks to a custom clipboard, and then create a file wrapper (TaskPaper) for the contents of the clipboard.

 5  Omni Automation Script • Return the contents of the file wrapper as the result of this action.

Export Selected Tasks to Craft Workflow

 6  “Open App” action • Make Craft the active application.

 7  Import Text into Craft • Use the action settings to determine how the TaskPaper contents are added to the chosen Craft document.

Omni Automation Script

Here is the script used in the Omni Automation Script action:

Export Selected Tasks as TaskPaper


(async () => { try { if(!selection.tasks.length > 0){ throw { name: "Selection Issue", message: "Please select one or more tasks." } } var tasks = selection.tasks var clipboard = Pasteboard.makeUnique() copyTasksToPasteboard(tasks, clipboard) var data = Data.fromString(clipboard.string) var wrapper = FileWrapper.withContents('Pasteboard.txt', data) return wrapper.contents.toString() } catch(err) { var alertPromise = await new Alert(err.name, err.message).show() throw `${err.name}\n${err.message}` } })();