Editorial Workflows


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: A workflow that makes it easy to set up actions like "reply", "bookmark" etc in Workflow.app so that one can easily get social on the mobile IndieWeb.

Shared by: VoxPelli

Comments: Comment Feed (RSS)

There are no comments yet.

+ Add Comment

Workflow Preview
Run Python Script ?
Source Code
import urllib
import workflow
import yaml

url = workflow.get_input()

url = urllib.unquote(url).decode('utf8')

url = url.split(',', 1)

action = url[0]
link = url[1]

frontMatter = {}

if action == 'reply':
  key = 'in-reply-to'
elif action == 'bookmark':
  key = 'bookmark-of'
  link = link.split('\n',2)
  title = link[1]
  quote = link[2]
  link = link[0]
elif action == 'repost':
  key = 'repost-of'
elif action == 'like':
  key = 'like-of' 

frontMatter[key] = str(link)

yamlFrontMatter = yaml.dump(frontMatter, default_flow_style=False)

content = '---\n' + yamlFrontMatter + '---\n'

if title:
	content += '# ' + title + '\n'

if quote:
  content += '> ' + quote

Create Document ?
Input %cursor
Open in Editor