Editorial Workflows

Custom Menu

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: Monday September 15, 2014 3:5455 AM

This workflow uses a Custom UI to make bookmark drop-down menus easier to create.

List items are stored in a variable outside of the Custom UI action, and fill a tableView inside of the Custom UI action.

However, resulting actions for the selected menu item can be created outside of the Custom UI action.

I have bundled a few of my workflows as an example.

Menus can be saved to the bookmark bar for drop-down access.

-Tutorial Doctor


Shared by: Tutorial Doctor

Comments: Comment Feed (RSS)

There are no comments yet.

+ Add Comment

Workflow Preview
READ ME❗ ?
Text
All sub-actions are created by the Tutorial Doctor, and are available in the Public Workflow Directory.
Initialize Variable ?
Variable Name
selected
Value
List Items ?
Variable Name
list
Value
New Index Outline Parts of Speech Taskpaper to Markdown Markdown to Taskpaper
Menu UI ?
User Interface
Presentation Style
  • Sheet
  • Full-Screen
  • Popover
Output
Use Editor Theme
ON
If New... ?
Run the block if
selected
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
New
Get Input ?
Title
Document Name?
Initial Text
  • Single Line
  • Multiple Lines
Keyboard Options:
Generate Document ?
Run the block if
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Comment ?
Store Name Input ?
Variable Name
doc
Value
Input.md
Create Document ?
File Name
%var:doc
In Dropbox
OFF
New Text
If File Does Not Exist
  • Create
  • Stop Workflow
Open Document ?
File Name
%var:doc
In Dropbox
OFF
…End If
…End If
If Index ?
Run the block if
selected
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Index
Index Action ?
Run the block if
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
i ?
Expression
0
On Error
  • Stop Workflow
  • Output "ERROR"
Result
  • Pass to Next Action
  • Store in Variable:
i
Index ?
Run the block if
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Document Text ?
Folded Text
  • Include
  • Replace with:
Find Words ?
Repeat with
  • Every Line
  • Every Match of Regular Expression:
\w+
Match Group
0 (entire match)
Reverse
OFF
Generate Text ?
Text
%repeat:text
…End Repeat
Sort Lines ?
Sort Order
  • Ascending (A → Z)
  • Descending (Z → A)
Remove Duplicate Lines ?
Select from List ?
Title
Index
List (Lines)
Input
Multiple Selection
OFF
Show in Popover
ON
Store Selected ?
Variable Name
selected
Value
Input
Play Sound Effect ?
Effect
Coin_2
Wait until Finished
OFF
…End If
Highlight Occurrences ?
Search for
%var:Input
Regular Expression
OFF
Select First Result
OFF
Count Occurances ?
Run the block if
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Document Text ?
Folded Text
  • Include
  • Replace with:
Occurances of Selected ?
Repeat with
  • Every Line
  • Every Match of Regular Expression:
selected
Match Group
0 (entire match)
Reverse
OFF
Increment ?
Expression
i + 1
On Error
  • Stop Workflow
  • Output "ERROR"
Result
  • Pass to Next Action
  • Store in Variable:
i
…End Repeat
Speak Text ?
Text
i matches found.
Language
  • System Language
  • Guess Text Language
Wait until Finished
ON
Rate
  • Very Slow
  • Slow
  • Normal
  • Faster
  • Very Fast
…End If
…End If
…End If
If Outline ?
Run the block if
selected
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Outline
Outline Action ?
Run the block if
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Comment ?
Text
By the Tutorial Doctor
UI Outline ?
Run the block if
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
file ?
Variable Name
file
Value
File Extension
Extend Selection ?
Direction
  • Backward
  • Forward
  • Both
Unit
  • Start/End of Document
  • Start/End of Line
  • Number of Characters...
1
Document Text ?
Folded Text
  • Include
  • Replace with:
Find Pattern ?
Repeat with
  • Every Line
  • Every Match of Regular Expression:
^.+
Match Group
0 (entire match)
Reverse
OFF
Generate Text ?
Text
%repeat:text
…End Repeat
Store Pattern ?
Variable Name
pattern
Value
Input
Custom UI ?
User Interface
Presentation Style
  • Sheet
  • Full-Screen
  • Popover
Output
%ui:tableview1
Use Editor Theme
ON
Extend Selection ?
Direction
  • Backward
  • Forward
  • Both
Unit
  • Start/End of Document
  • Start/End of Line
  • Number of Characters...
1
Store New List ?
Variable Name
newList
Value
Input
Task update ?
Run the block if
file
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
taskpaper
Update spacing ?
Repeat with
  • Every Line
  • Every Match of Regular Expression:
.+
Match Group
0 (entire match)
Reverse
OFF
Replace Selected Text ?
Replacement Text
%repeat:text
…End Repeat
…End If
Txt update ?
Run the block if
file
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
txt
Update spacing ?
Repeat with
  • Every Line
  • Every Match of Regular Expression:
.+
Match Group
0 (entire match)
Reverse
OFF
Replace Selected Text ?
Replacement Text
%repeat:text
…End Repeat
…End If
Markdown Update ?
Run the block if
file
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
md
Update spacing ?
Repeat with
  • Every Line
  • Every Match of Regular Expression:
.+
Match Group
0 (entire match)
Reverse
OFF
Replace Selected Text ?
Replacement Text
%repeat:text
…End Repeat
…End If
…End If
Move Caret to Top ?
Range (from:to)
0:0
Relative to
  • Entire Document
  • Current Selection
…End If
…End If
If Task to Mark ?
Run the block if
selected
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Taskpaper to Markdown
Taskpaper to Markdown ?
Run the block if
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Convert ?
Run the block if
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Header Expression ?
Variable Name
expression
Value
.+:
Prefix/Suffix ?
Variable Name
prefix
Value
#
Suffix Expression ?
Run the block if
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Document Text ?
Folded Text
  • Include
  • Replace with:
For Every Character... ?
Repeat with
  • Every Line
  • Every Match of Regular Expression:
.+
Match Group
0 (entire match)
Reverse
OFF
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
http
And if... ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
colon
Replace Headers ?
Find
expression
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
prefix %repeat:text
…End If
…End If
Replace Colon ?
Find
:
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
…End Repeat
…End If
…End If
Store Conversion ?
Variable Name
Mark
Value
Input
Generate Markdown ?
Run the block if
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Comment ?
Store Name Input ?
Variable Name
doc
Value
File Name.md
Create Document ?
File Name
%var:doc
In Dropbox
OFF
New Text
Mark
If File Does Not Exist
  • Create
  • Stop Workflow
Open Document ?
File Name
%var:doc
In Dropbox
OFF
…End If
…End If
…End If
If Mark to Task ?
Run the block if
selected
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Markdown to Taskpaper
Markdown to Taskpaper ?
Run the block if
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Convert ?
Run the block if
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Header Expression ?
Variable Name
expression
Value
#+\s.+
Prefix/Suffix ?
Variable Name
suffix
Value
:
Suffix Expression ?
Run the block if
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Document Text ?
Folded Text
  • Include
  • Replace with:
For Every Character... ?
Repeat with
  • Every Line
  • Every Match of Regular Expression:
.+
Match Group
0 (entire match)
Reverse
OFF
Replace Headers ?
Find
expression
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
%repeat:text suffix
Replace bullets ?
Find
[/*/+-]\s+
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
-
Replace Multi-hash ?
Find
#{1,3}
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
…End Repeat
…End If
…End If
Store Conversion ?
Variable Name
Task
Value
Input
Generate tasks ?
Run the block if
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Comment ?
Store Name Input ?
Variable Name
doc
Value
File Name.taskpaper
Create Document ?
File Name
%var:doc
In Dropbox
OFF
New Text
Task
If File Does Not Exist
  • Create
  • Stop Workflow
Open Document ?
File Name
%var:doc
In Dropbox
OFF
…End If
…End If
…End If
If Parts of Speech ?
Run the block if
selected
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Parts of Speech
Parts of Speech ?
Run the block if
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Document Text ?
Folded Text
  • Include
  • Replace with:
Remove Punctuation ?
Find
[.,?!'-;:<>#%*+~|="“”’–*{}()$\\]
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Parts of Speech ?
Remove Tagger Whitespace ?
Repeat with
  • Every Line
  • Every Match of Regular Expression:
Match Group
0 (entire match)
Reverse
OFF
Find / Replace ?
Find
= (Whitespace)
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
…End Repeat
Remove Duplicate Lines ?
Sort Lines ?
Sort Order
  • Ascending (A → Z)
  • Descending (Z → A)
Remove Whitespace ?
  • Trim leading/trailing whitespace
  • Remove empty lines
Store List ?
Variable Name
full_list
Value
Input
Select from List ?
Title
Parts of Speech
List (Lines)
full_list
Multiple Selection
OFF
Show in Popover
OFF
Play Sound Effect ?
Effect
Coin_2
Wait until Finished
OFF
Find Words ?
Search for
\w+
Match Group (RegEx)
0 (entire match)
Search Type
  • Regular Expression
  • Case-insensitive Search (A = a)
  • Case-sensitive Search (A ≠ a)
Output
  • Found Text
  • Range of Text (from:to)
Store Selected ?
Variable Name
selected
Value
Input
Count & Speak Occurances ?
Run the block if
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Document Text ?
Folded Text
  • Include
  • Replace with:
Occurances of Selected ?
Repeat with
  • Every Line
  • Every Match of Regular Expression:
selected
Match Group
0 (entire match)
Reverse
OFF
Increment ?
Expression
i + 1
On Error
  • Stop Workflow
  • Output "ERROR"
Result
  • Pass to Next Action
  • Store in Variable:
i
…End Repeat
Speak Text ?
Text
i matches found.
Language
  • System Language
  • Guess Text Language
Wait until Finished
ON
Rate
  • Very Slow
  • Slow
  • Normal
  • Faster
  • Very Fast
…End If
Highlight Occurrences ?
Search for
%var:selected
Regular Expression
OFF
Select First Result
OFF
Show Alert ?
Title
Do want to define this word?
Message
Button 1
Yes
Output Value
Yes
Button 2
No
Output Value
Button 3
(don't show)
Output Value
Show Cancel Button
ON
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Yes
Generate Text ?
Text
selected
Show Definition ?
…End If
…End If
…End If