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.
Video 1: Export Selected Tasks to Craft as TaskPaper |
Exports the contents of the selected tasks in TaskPaper format to the Craft application. |
|
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}`
}
})();