Created
February 8, 2013 12:33
-
-
Save macdrifter/4738765 to your computer and use it in GitHub Desktop.
Editorial workflow to insert reference link
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This gist contains a workflow for Editorial, an app for | |
writing plain text and markdown on iOS. | |
To import the workflow, copy the *entire* text of the gist, | |
then open Editorial and create a new workflow. | |
------------ BEGIN WORKFLOW ------------ | |
{ | |
"actions" : [ | |
{ | |
"class" : "WorkflowActionGetEditorText", | |
"parameters" : { | |
} | |
}, | |
{ | |
"class" : "WorkflowActionFilterLines", | |
"parameters" : { | |
"expression" : { | |
"text" : "^\\[([^^\\]]+)\\]:\\s+(.+)$", | |
"type" : "advancedText", | |
"tokenRanges" : { | |
} | |
}, | |
"comparisonType" : 2 | |
} | |
}, | |
{ | |
"class" : "WorkflowActionSelectFromList", | |
"parameters" : { | |
"list" : { | |
"text" : "?", | |
"type" : "advancedText", | |
"tokenRanges" : { | |
"{0, 1}" : "Input" | |
} | |
}, | |
"allowMultipleSelection" : false | |
} | |
}, | |
{ | |
"class" : "WorkflowActionMatchRegularExpression", | |
"parameters" : { | |
"regex" : { | |
"text" : "^\\[([^^\\]]+)\\]", | |
"type" : "advancedText", | |
"tokenRanges" : { | |
} | |
}, | |
"matchGroup" : "" | |
} | |
}, | |
{ | |
"class" : "WorkflowActionReplaceSelectedText", | |
"parameters" : { | |
"replacement" : { | |
"text" : "?", | |
"type" : "advancedText", | |
"tokenRanges" : { | |
"{0, 1}" : "Input" | |
} | |
} | |
} | |
} | |
], | |
"name" : "Insert Link Mark" | |
} | |
------------- END WORKFLOW ------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment