Editorial Workflows

Post to blog

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: Posting from Editorial to Kirby CMS via Dropbox

Comments: Comment Feed (RSS)

Johnk894 — 17 Sep 2014
It is also possible that Zynga's chosen advertising ekfkbekeceac
cheap_viagra — 04 Dec 2017
generic_cialis — 18 Dec 2017
buy_cialis — 31 Dec 2017
cialis_online — 04 Jan 2018
cheap — 29 Jan 2018
cialis_cheap — 07 Feb 2018
cialis — 05 Mar 2018
buy_cialis — 08 Mar 2018
viagra_professional — 08 Mar 2018
viagra — 08 Mar 2018
viagra_cheap — 13 Mar 2018
cialis — 22 Mar 2018

+ Add Comment

Workflow Preview
Select Range ?
Range (from:to)
0:1
Relative to
  • Entire Document
  • Current Selection
Selected Text ?
Entire Line(s)
OFF
Empty Selection Output
  • No Output
  • All Text
  • Closest Word
Folded Text
  • Include
  • Replace with:
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
#
Move Caret ?
Direction
  • Backward
  • Forward
  • Start/End of Document
  • Start/End of Line
  • Number of Characters:
1
Move Caret ?
Direction
  • Backward
  • Forward
  • Start/End of Document
  • Start/End of Line
  • Number of Characters:
2
…End If
Extend Selection ?
Direction
  • Backward
  • Forward
  • Both
Unit
  • Start/End of Document
  • Start/End of Line
  • Number of Characters...
1
Selected Text ?
Entire Line(s)
OFF
Empty Selection Output
  • No Output
  • All Text
  • Closest Word
Folded Text
  • Include
  • Replace with:
Set Variable ?
Variable Name
title
Value
Input
Generate Text ?
Text
title
Generate cleaned up file name from title ?
Source Code
#coding: utf-8
import workflow
import string

action_in = workflow.get_input()

filename = action_in.lower()
filename = filename.encode('utf-8')
filename = filename.replace('–','-')
filename = filename.replace('—','-')
filename = filename.replace(' - ','-')
filename = filename.replace(' ','_')
filename = filename.replace('"','')
filename = filename.replace('“','')
filename = filename.replace('”','')
filename = filename.replace('„','')
filename = filename.replace('…','_')
filename = filename.replace('_-_','-')
filename = filename.replace('___','_')
filename = filename.replace('!','')
filename = filename.replace('?','')
filename = filename.replace('‽','')

action_out = filename

workflow.set_output(action_out)
Set Variable ?
Variable Name
filename
Value
Input
Set Variable ?
Variable Name
filepath
Value
babylondreams.dyndns.org:2121/content/01-blog/Year: 2001Month: 01Day: 01-filename
Copy future blog posts path to clipboard ?
Add Dropbox location to filename ?
Variable Name
filename
Value
KirbyBlog/filename.md
Move Caret ?
Direction
  • Backward
  • Forward
  • Start/End of Document
  • Start/End of Line
  • Number of Characters:
2
Extend Selection ?
Direction
  • Backward
  • Forward
  • Both
Unit
  • Start/End of Document
  • Start/End of Line
  • Number of Characters...
1
Selected Text ?
Entire Line(s)
OFF
Empty Selection Output
  • No Output
  • All Text
  • Closest Word
Folded Text
  • Include
  • Replace with:
Set Variable ?
Variable Name
body
Value
Input
Deselect all, so nothing is selected when we are donew ith this workflow ?
Range (from:to)
0:0
Relative to
  • Entire Document
  • Current Selection
Ask for subtitle ?
Title
Please enter a post subtitle (leave empty if you already have a subtitle or don't want one):
Initial Text
  • Single Line
  • Multiple Lines
Keyboard Options:
Set Variable ?
Variable Name
subtitle
Value
Input
If… ?
Run the block if
subtitle
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Set Variable ?
Variable Name
subtitle
Value
---- Subtitle: subtitle
…End If
Generate Text ?
Text
Title: title ---- Date: Day: 01.Month: 01.Year: 2001 ---- Time: Year: 2001-Month: 01-Day: 01-Hour: 01 (24h)-Minute: 01-Second: 01 ---- Text: body subtitle
Set File Contents ?
File Name
%var:filename
In Dropbox
ON
New Text
Input
If File Does Not Exist
  • Create
  • Stop Workflow
Get the path of the current file ?
Source Code
#coding: utf-8
import workflow
import editor

action_in = workflow.get_input()

action_out = editor.get_path()

workflow.set_output(action_out)
Set Variable ?
Variable Name
oldfile
Value
Input
Ask for archival or deletion ?
Title
Archive
Message
Archive Post?
Button 1
Yes
Output Value
Yes
Button 2
No
Output Value
No
Button 3
(don't show)
Output Value
Show Cancel Button
ON
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
No
Open URL ?
Open in
  • In-App Browser
  • Default App / Safari
URL
editorial://open/filename?root=dropbox
Tab
  • Last-used Tab
  • New Tab
  • Tab with ID:
Unique identifier
Wait until Loaded
OFF
Reveal Browser Automatically
ON
Run Python Script ?
Source Code
#coding: utf-8
import workflow
import os
import editor

action_in = workflow.get_input()
oldfilepath = workflow.get_variable("oldfile")
os.remove(oldfilepath)
editor.reload_files()
action_out = action_in

workflow.set_output(action_out)
…End If
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Yes
Get Current File Name ?
Include Folder
OFF
Include Extension
ON
Set Variable ?
Variable Name
archivename
Value
Archive/Input
Document Text ?
Folded Text
  • Include
  • Replace with:
Set Variable ?
Variable Name
archivetext
Value
Input
Set File Contents ?
File Name
%var:archivename
In Dropbox
ON
New Text
archivetext
If File Does Not Exist
  • Create
  • Stop Workflow
Open URL ?
Open in
  • In-App Browser
  • Default App / Safari
URL
editorial://open/filename?root=dropbox
Tab
  • Last-used Tab
  • New Tab
  • Tab with ID:
Unique identifier
Wait until Loaded
OFF
Reveal Browser Automatically
ON
Run Python Script ?
Source Code
#coding: utf-8
import workflow
import os
import editor

action_in = workflow.get_input()
oldfilepath = workflow.get_variable("oldfile")
os.remove(oldfilepath)
editor.reload_files()
action_out = action_in

workflow.set_output(action_out)
…End If