Editorial Workflows

Working Copy

public workflow

Install 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: Workflow for transferring files from Working Copy to Editorial and back again.

When called with input, it will pick the filename from the first line and write the other lines into this file, which lets Working Copy create a new file with predefined content. The filename contains a unique identifier for remembering where it belongs. To avoid overwriting files in Editorial by mistake, the previous contents of files are put in WorkingCopy.bak

When this workflow is called without any input the contents of the current file is written back to Working Copy.

Change askcommit variable to 0 if you just want to save and not be asked to commit.

To install a new version of this workflow delete or rename this one and perform Edit in Editorial from Working Copy.

Comments: Comment Feed (RSS)

There are no comments yet.

+ Add Comment

Workflow Preview
Set Variable ?
Variable Name
all
Value
Input
If… ?
Run the block if
all
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Set Variable ?
Variable Name
key
Value
7UXXJE9HLY
Set Variable ?
Variable Name
askcommit
Value
1
Set Variable ?
Variable Name
path
Value
File Name
If… ?
Run the block if
File Extension
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Set Variable ?
Variable Name
path
Value
File Name.File Extension
…End If
Document Text ?
Folded Text
  • Include
  • Replace with:
Open URL ?
Open in
  • In-App Browser
  • Default App / Safari
URL
working-copy://x-callback-url/write/?key=key&askcommit=askcommit&path=path&text=Input
Tab
  • Last-used Tab
  • New Tab
  • Tab with ID:
Unique identifier
Wait until Loaded
OFF
Reveal Browser Automatically
ON
Stop ?
Stop
  • This Workflow
  • Repeat Block
Show HUD Alert
OFF
Message
Stopped
…End If
Find ?
Search for
(.*)\n
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
filename
Value
Input
Generate Text ?
Text
all
Find / Replace ?
Find
filename
  • Case-insensitive (A = a)
  • Case-sensitive (A ≠ a)
  • Regular Expression
Replace with
Set Variable ?
Variable Name
text
Value
Input
Get File Contents ?
File Name
%var:filename
In Dropbox
OFF
If File Does Not Exist
  • Empty Output
  • Stop Workflow
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Set File Contents ?
File Name
WorkingCopy.bak
In Dropbox
OFF
New Text
Input
If File Does Not Exist
  • Create
  • Stop Workflow
Show HUD ?
HUD Text
Previous content of filename put in WorkingCopy.bak
Duration
  • 1 Second
  • 2 Seconds
  • 3 Seconds
Icon
  • "Success"
  • "Error"
…End If
Set File Contents ?
File Name
%var:filename
In Dropbox
OFF
New Text
text
If File Does Not Exist
  • Create
  • Stop Workflow
Open Document ?
File Name
%var:filename
In Dropbox
OFF