Editorial Workflows

New OmniFocus Project

public workflow

Install Workflow...

This workflow contains at least one Python script. Only use it if you trust the person who shared this with you, and if you know exactly what it does.

I understand, install the workflow!

This is a workflow for Editorial, a Markdown and plain text editor for iOS. To download it, you need to view this page on a device that has the app installed.

Description: This workflow creates a new OmniFocus project from a taskpaper template.

Shared by: devinmckaskle.com

Comments: Comment Feed (RSS)

There are no comments yet.

+ Add Comment

Workflow Preview
Selected Text ?
Entire Line(s)
OFF
Empty Selection Output
  • No Output
  • All Text
  • Closest Word
Folded Text
  • Include
  • Replace with:
Run Python Script ?
Source Code
#coding: utf-8
import workflow
import dialogs
import re

action_in = workflow.get_input()

action_out = action_in

# find lists
for list_match in re.finditer(u"«(\S+?):(\S+?)»", action_in):
	prompt = list_match.group(1)
	options_string = list_match.group(2)
	options = options_string.split(',')
	value = dialogs.list_dialog(prompt, options)
	if value == None:
		workflow.stop()
	
	action_out = re.sub(u"«" + prompt + ":" + options_string + "»", value, action_out)
	action_out = re.sub(u"«" + prompt + "»", value, action_out)

# Find placeholders
known_placeholders = set()
placeholders = []
fields = []
for placeholder_match in re.finditer(u"«(\S+?)»", action_out):
	placeholder = placeholder_match.group(1)
	if placeholder not in known_placeholders:
		known_placeholders.add(placeholder)
		placeholders.append(placeholder)
		fields.append({'type': 'text', 'title': placeholder, 'key': placeholder})

# Substitute the placeholders
if len(placeholders) != 0:
	values = dialogs.form_dialog(title='', fields=fields, sections=None)
	if values:
		for key in values:
			action_out = re.sub(u"«" + key + "»", values[key], action_out)

workflow.set_output(action_out)
URL Escape ?
Set Variable ?
Variable Name
encodedContent
Value
Input
Open URL ?
Open in
  • In-App Browser
  • Default App / Safari
URL
omnifocus://x-callback-url/paste?target=projects&content=encodedContent
Tab
  • Last-used Tab
  • New Tab
  • Tab with ID:
Unique identifier
Wait until Loaded
OFF
Reveal Browser Automatically
ON