Editorial Workflows

Copy File To

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: Copies the current local document to Dropbox or the current Dropbox document to the local storage.

:::Made by Macdrifter

Comments: Comment Feed (RSS)

There are no comments yet.

+ Add Comment

Workflow Preview
File Open? ?
Run the block if
File Name
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Stop ?
Stop
  • This Workflow
  • Repeat Block
Show HUD Alert
ON
Message
File Must Be Open
…End If
Get Bookmark URL ?
Include Selected Range
OFF
Set Variable ?
Variable Name
origLocation
Value
Input
Get Current File Name ?
Include Folder
OFF
Include Extension
ON
Set Variable ?
Variable Name
currentFile
Value
Input
If Dropbox File ?
Run the block if
origLocation
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
?root=dropbox
Show Alert ?
Title
Copy File
Message
Copy file to Local Storage with OVERWRITE?
Button 1
OK
Output Value
Input
Button 2
(don't show)
Output Value
Button 3
(don't show)
Output Value
Show Cancel Button
ON
Run Python Script ?
Source Code
#coding: utf-8
import workflow
import editor
import webbrowser
import urllib

file_name = workflow.get_variable('currentFile')

file_content = editor.get_file_contents(file_name, 'dropbox')
editor.set_file_contents(file_name, file_content)
webbrowser.open('editorial://open/' + urllib.quote(file_name) + '?root=local')
Show HUD ?
HUD Text
currentFile copied to local storage
Duration
  • 1 Second
  • 2 Seconds
  • 3 Seconds
Icon
  • "Success"
  • "Error"
…End If
If… ?
Run the block if
origLocation
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
?root=dropbox
Show Alert ?
Title
Copy File
Message
Copy file to Dropbox?
Button 1
OK
Output Value
Input
Button 2
(don't show)
Output Value
Button 3
(don't show)
Output Value
Show Cancel Button
ON
Run Python Script ?
Source Code
#coding: utf-8
import workflow
import editor
import webbrowser
import urllib

file_name = workflow.get_variable('currentFile')

file_content = editor.get_file_contents(file_name, 'local')
editor.set_file_contents(file_name, file_content, 'dropbox')
webbrowser.open('editorial://open/' + urllib.quote(file_name) + '?root=dropbox')
Show HUD ?
HUD Text
currentFile copied to Dropbox
Duration
  • 1 Second
  • 2 Seconds
  • 3 Seconds
Icon
  • "Success"
  • "Error"
…End If