Editorial Workflows

Search 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: Searches the workflow directory using the JSON API, and presents the results in a list selection.

Shared by: @olemoritz

Comments: Comment Feed (RSS)

There are no comments yet.

+ Add Comment

Workflow Preview
Set Variable ?
Variable Name
Description
Value
Request Text Input ?
Title
Search for...
Initial Text
  • Single Line
  • Multiple Lines
Keyboard Options:
Run Python Script ?
Source Code
#coding: utf-8
import workflow

action_in = workflow.get_input()
if not action_in:
	workflow.stop()

import requests
import urllib
import json

url = 'http://editorial-app.appspot.com/workflows/search?format=json&q=' + urllib.quote(action_in, '')
r = requests.get(url)
response_dict = json.loads(r.text)

lines = []
wf_infos = response_dict['workflows']
for wf in wf_infos:
	lines.append(wf['title'] + '\t' + wf['url'])

workflow.set_output('\n'.join(lines))
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Stop ?
Stop
  • This Workflow
  • Repeat Block
Show HUD Alert
ON
Message
No Results
…End If
Select from List ?
Title
Results
List (Lines)
Input
Multiple Selection
OFF
Show in Popover
OFF
Run Python Script ?
Source Code
#coding: utf-8
import workflow

workflow_url = workflow.get_input()
if not workflow_url:
	workflow.stop()

import urllib
import requests
import json

json_url = workflow_url + '?format=json'
r = requests.get(json_url)
wf_dict = json.loads(r.text)
description = wf_dict['description']
workflow.set_variable('Description', description)
workflow.set_output(wf_dict['install_url'])
Show Alert ?
Title
Workflow Description
Message
Description
Button 1
Continue
Output Value
Input
Button 2
(don't show)
Output Value
Button 3
(don't show)
Output Value
Show Cancel Button
ON
Open URL ?
Open in
  • In-App Browser
  • Default App / Safari
URL
Input
Tab
  • Last-used Tab
  • New Tab
  • Tab with ID:
Unique identifier
Wait until Loaded
OFF
Reveal Browser Automatically
ON