Editorial Workflows

[TP] Insert_Tag

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: List Taskpaper contexts. Select from list to insert.

This workflow allows multiple tag select, including an option to input a new tag.

::: By Macdrifter ::: v.1.0

Shared by: Macdrifter.com

Comments: Comment Feed (RSS)

There are no comments yet.

+ Add Comment

Workflow Preview
Document Text ?
Folded Text
  • Include
  • Replace with:
Set Variable ?
Variable Name
docText
Value
Input
Extract All Tags by Python ?
Source Code
#coding: utf-8
import workflow
import re


document_in = workflow.get_input()

charac_pattern = r'''(@\w+)\b'''

reg_obj = re.compile(charac_pattern)
matches = re.findall(reg_obj, document_in)
match_string = '\n'.join(matches)


action_out = match_string

workflow.set_output(action_out)
Remove Standard Tags ?
Find
(@done|@started)\n
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Sort Lines ?
Sort Order
  • Ascending (A → Z)
  • Descending (Z → A)
Set Variable ?
Variable Name
tagList
Value
--- New Tag --- @due @hold @waiting @defer @done(Year: 2001-Month: 01-Day: 01) @started(Year: 2001-Month: 01-Day: 01) Input
Remove Duplicate Lines ?
Select from List ?
Title
Tags
List (Lines)
Input
Multiple Selection
ON
Show in Popover
ON
Set Variable ?
Variable Name
tagSelect
Value
Input
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
--- New Tag ---
Request Text Input ?
Title
Enter New Tag
Initial Text
  • Single Line
  • Multiple Lines
Keyboard Options:
Set Variable ?
Variable Name
tagSelect
Value
InputtagSelect
Find / Replace ?
Find
--- New Tag ---
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
…End If
Remove Newline ?
Find
\n
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Console Input and Stop ?
Run the block if
1
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
1
Console Output ?
Text
Input
Stop ?
Stop
  • This Workflow
  • Repeat Block
Show HUD Alert
ON
Message
Stopped
…End If
Replace Selected Text ?
Replacement Text
Input%cursor