Editorial Workflows

TP to Fantastical

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.

Shared by: @hals_pg

Comments: Comment Feed (RSS)

There are no comments yet.

+ Add Comment

Workflow Preview
Callback ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Set Variable ?
Variable Name
callback
Value
Input
Set Variable ?
Variable Name
tag
Value
Set Variable ?
Variable Name
source
Value
Set Variable ?
Variable Name
path
Value
Set Variable ?
Variable Name
done
Value
@done(Year: 2001-Month: 01-Day: 01)
Run Python Script ?
Source Code
#coding: utf-8
import workflow

a = workflow.get_variable('callback').split('\n')
tag = ' @Added(' + a[0] + ')'
path = a[1]
source = a[2]
workflow.set_variable('path', path)
workflow.set_variable('source', source)
workflow.set_variable('tag', tag)
Generate Text ?
Text
source
エスケープ(正規表現) ?
Run the block if
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Find / Replace ?
Find
¥
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Find / Replace ?
Find
*
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
\*
Find / Replace ?
Find
+
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
\+
Find / Replace ?
Find
.
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
\.
Find / Replace ?
Find
?
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
\?
Find / Replace ?
Find
(
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
\(
Find / Replace ?
Find
)
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
\)
Find / Replace ?
Find
[
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
\[
Find / Replace ?
Find
]
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
\]
Find / Replace ?
Find
{
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
\{
Find / Replace ?
Find
}
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
\}
Find / Replace ?
Find
^
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
\^
Find / Replace ?
Find
$
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
\$
Find / Replace ?
Find
|
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
\|
Find / Replace ?
Find
/
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
\/
Find / Replace ?
Find
"
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
\"
Find / Replace ?
Find
'
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
\'
…End If
Set Variable ?
Variable Name
escaped_source
Value
Input
Get File Contents ?
File Name
%var:path
In Dropbox
ON
If File Does Not Exist
  • Empty Output
  • Stop Workflow
Set Variable ?
Variable Name
contents
Value
Input
Find ?
Search for
.*escaped_source.*
Match Group (RegEx)
0
Search Type
  • Regular Expression
  • Case-insensitive Search (A = a)
  • Case-sensitive Search (A ≠ a)
Output
  • Found Text
  • Range of Text (from:to)
Set Variable ?
Variable Name
old
Value
Input
Find / Replace ?
Find
tag
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
done
Set Variable ?
Variable Name
out
Value
Input
Generate Text ?
Text
contents
Find / Replace ?
Find
old
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
out
Set File Contents ?
File Name
%var:path
In Dropbox
ON
New Text
Input
If File Does Not Exist
  • Create
  • Stop Workflow
Stop ?
Stop
  • This Workflow
  • Repeat Block
Show HUD Alert
OFF
Message
Stopped
…End If
Get Current File Name ?
Include Folder
ON
Include Extension
ON
Set Variable ?
Variable Name
path
Value
Input
Set Variable ?
Variable Name
app
Value
Fantastical
Extend Selection ?
Direction
  • Backward
  • Forward
  • Both
Unit
  • Start/End of Document
  • Start/End of Line
  • Number of Characters...
1
Set Variable ?
Variable Name
source
Value
Selected Text
Find / Replace ?
Find
^\s*-\s*
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Set Variable ?
Variable Name
task
Value
Input
Find ?
Search for
@due\((.*?)\)
Match Group (RegEx)
1
Search Type
  • Regular Expression
  • Case-insensitive Search (A = a)
  • Case-sensitive Search (A ≠ a)
Output
  • Found Text
  • Range of Text (from:to)
Set Variable ?
Variable Name
date
Value
Input
Generate Text ?
Text
task
Find ?
Search for
@start\((.*?)\)
Match Group (RegEx)
1
Search Type
  • Regular Expression
  • Case-insensitive Search (A = a)
  • Case-sensitive Search (A ≠ a)
Output
  • Found Text
  • Range of Text (from:to)
Set Variable ?
Variable Name
time
Value
Input
Generate Text ?
Text
task
Find ?
Search for
@end\((.*?)\)
Match Group (RegEx)
1
Search Type
  • Regular Expression
  • Case-insensitive Search (A = a)
  • Case-sensitive Search (A ≠ a)
Output
  • Found Text
  • Range of Text (from:to)
Set Variable ?
Variable Name
end
Value
Input
Set Variable ?
Variable Name
todoflg
Value
todo
Generate Text ?
Text
task
Find ?
Search for
@([1-3]{1})(\s|$)
Match Group (RegEx)
1
Search Type
  • Regular Expression
  • Case-insensitive Search (A = a)
  • Case-sensitive Search (A ≠ a)
Output
  • Found Text
  • Range of Text (from:to)
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
1
Set Variable ?
Variable Name
priority
Value
!
…End If
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
2
Set Variable ?
Variable Name
priority
Value
!!
…End If
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
3
Set Variable ?
Variable Name
priority
Value
!!!
…End If
…End If
If… ?
Run the block if
end
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Set Variable ?
Variable Name
todoflg
Value
Set Variable ?
Variable Name
priority
Value
…End If
Generate Text ?
Text
task
Find ?
Search for
^(.*?)\s*@
Match Group (RegEx)
1
Search Type
  • Regular Expression
  • Case-insensitive Search (A = a)
  • Case-sensitive Search (A ≠ a)
Output
  • Found Text
  • Range of Text (from:to)
Set Variable ?
Variable Name
title
Value
Input
Title ?
Text
todoflgtitlepriority date time
Set Variable ?
Variable Name
title_date_time
Value
Input
Generate Text ?
Text
app path title
URL Escape ?
Set Variable ?
Variable Name
callback
Value
editorial://?input=Input&command=TP%20to%20Fantastical
URL Escape ?
Generate Text ?
Text
title_date_time callback
URL Escape ?
Set Variable ?
Variable Name
out
Value
Input
Move Caret ?
Direction
  • Backward
  • Forward
  • Start/End of Document
  • Start/End of Line
  • Number of Characters:
1
Replace Selected Text ?
Replacement Text
@Added(app)
Open URL ?
Open in
  • In-App Browser
  • Default App / Safari
URL
fantastical2://x-callback-url/parse?sentence=out&x-source=Editorial&x-success=editorial%3A
Tab
  • Last-used Tab
  • New Tab
  • Tab with ID:
Unique identifier
Wait until Loaded
OFF
Reveal Browser Automatically
ON