Editorial Workflows

Occ

unlisted 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 has no description.

Comments: Comment Feed (RSS)

There are no comments yet.

+ Add Comment

Workflow Preview
Document Text ?
Folded Text
  • Include
  • Replace with:
Extend Selection ?
Direction
  • Backward
  • Forward
  • Both
Unit
  • Start/End of Document
  • Start/End of Line
  • Number of Characters...
1
Set Variable ?
Variable Name
text
Value
Input
Request Text Input ?
Title
Word to search ?
Initial Text
  • Single Line
  • Multiple Lines
Keyboard Options:
Set Variable ?
Variable Name
word
Value
Input
Run Python Script ?
Source Code
#coding: utf-8
import workflow

action_in = workflow.get_input()

wftext = workflow.get_variable('text')
wfword = workflow.get_variable('word')

li = 0

for line in wftext:
	if wfword in line:
		li +=1
		
action_out = workflow.set_output(str(li))
Set Variable ?
Variable Name
NbLines
Value
Input
Show HUD ?
HUD Text
The word word occurs in NbLines lines
Duration
  • 1 Second
  • 2 Seconds
  • 3 Seconds
Icon
  • "Success"
  • "Error"
Highlight Occurrences ?
Search for
%var:word
Regular Expression
OFF
Select First Result
OFF