Action

Markdown Tasks to OmniFocus

Posted by rosemaryorchard, Last update about 4 years ago

Parse any - [ ] incomplete tasks in the current Draft and add them to your OmniFocus inbox.

Steps

  • script

    // See online documentation for examples
    // https://docs.getdrafts.com/docs/actions/scripting
    
    let taskpaper = '';
    draft.content.split("\n").forEach(function(line){
    	if (line.startsWith('- [ ]')) {
    		taskpaper += line.replace('[ ]', '') + "\n";
    	}
    });
    
    const baseURL = "omnifocus://x-callback-url/paste";
    let cb = CallbackURL.create();
    cb.baseURL = baseURL;
    cb.addParameter("content", taskpaper.trim());
    cb.open();

Options

  • After Success Default
    Notification Info
    Log Level Info
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.