Editorial Workflows

TP Focus on Tag...

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: TP Focus on Tag …

this workflow is based on the original "Focus on Tag…"* with two improvements for the use with TaskPaper documents.

1. added a step at the beginning to expand the entire document before looking for @tags to find all of them. the original "Focus on Tags…" would only find @tags in the currently filtered text.

2. adjusted the last step to show TaskPaper project headlines (ending with ":") in addition to @tags. this helps to keep an overview on the structure of the document.

enjoy!
||| tomas jay

@therealtomasjay

* what the original "Focus on Tag…" does:
After picking a tag from the list of tags in the current document, only tasks that contain this tag are shown, everything else is hidden (folded).

Shared by: @therealtomasjay

Comments: Comment Feed (RSS)

There are no comments yet.

+ Add Comment

Workflow Preview
Run Python Script ?
Source Code
#coding: utf-8

#. Focus on Tag (for TaskPaper)

#. this workflow is based on the original "Focus on Tag…"
#. with two improvements for the use with TaskPaper documents. 
	
#.   1. added a step at the beginning
#.      to expand the entire document before looking for @tags 
#.      to find all of them.
#.      the original "Focus on Tags…" would only find 
#.      @tags in the currently filtered text.

#.   2. adjusted the last step
#.      to show TaskPaper project headlines (ending with ":")
#.      in addition to @tags. 
#.      this helps to keep an overview 
#.      on the structure of the document.

#. enjoy!
#. ||| tomas jay
#. @therealtomasjay
Unfold All Text ?
Run Python Script ?
Source Code
#coding: utf-8
import workflow
import editor
import re

text = editor.get_text()
tags = sorted(set(re.findall('@\w+', text)))
if len(tags) == 0:
	import console
	console.hud_alert('No Tags Found', 'error')
	workflow.stop()
else:
	workflow.set_output('\n'.join(tags))
Select from List ?
Title
Select Tag
List (Lines)
Input
Multiple Selection
OFF
Show in Popover
OFF
Escape for RegEx ?
Fold Lines Containing… ?
  • Regular Expression
  • Case-insensitive Search (A = a)
  • Case-sensitive Search (A ≠ a)
(:$|Input\b)
Invert
ON