Editorial Workflows

Post Markdown to WordPress

public 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: Take a Markdown document and post it to a WordPress blog. Since WordPress now will accept Markdown directly there is no conversion to HTML done on the document. This workflow allows choosing a category(ies), entering post tags, and choosing a post status.

The workflow also looks for a Multimarkdown "Title:" tag at the top of the file. If one is found a choice of that title or the file name is given for use as the post title.

Enter your blog details in the parameters for the Get Connection Details action. "Service" is just a key used to store your blog password; it can be anything you like. Reset Password, copied from Federico Viticci's posting workflow, allows you to clear your stored password.

Shared by: http://jasonkratz.com

Comments: Comment Feed (RSS)

Jason Lee — 21 Aug 2015
it's not working, ask password again and again.

+ Add Comment

Workflow Preview
Set Variable ?
Variable Name
userid
Value
Set Variable ?
Variable Name
url
Value
Set Variable ?
Variable Name
service
Value
Input
Get Connection Details ?
Get Category List From WP ?
Choose A Category ?
Title
Choose a Posting Category(ies)
List (Lines)
Input
Multiple Selection
ON
Show in Popover
OFF
Set Variable ?
Variable Name
categories
Value
Input
Enter Post Tags ?
Title
Enter Post Tags
Initial Text
  • Single Line
  • Multiple Lines
Keyboard Options:
Remove Whitespace ?
  • Trim leading/trailing whitespace
  • Remove empty lines
Set Variable ?
Variable Name
tags
Value
Input
Choose A Post Status ?
Title
Post Status
List (Lines)
Draft draft Published publish Private private
Multiple Selection
OFF
Show in Popover
OFF
Set Variable ?
Variable Name
postStatus
Value
Input
Get Current File Name ?
Include Folder
OFF
Include Extension
OFF
Set Variable ?
Variable Name
filename
Value
Input
Document Text ?
Folded Text
  • Include
  • Replace with:
Set Variable ?
Variable Name
text
Value
Input
Filter Lines ?
Output Lines That
  • Contain
  • Don't Contain
  • Match Regular Expression:
^Title:.*
Output Format
  • Only Lines
  • Lines and Ranges
Set Variable ?
Variable Name
mmdTitleLine
Value
Input
If MMD Title Found: ?
Run the block if
mmdTitleLine
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
^Title:
Document Text ?
Folded Text
  • Include
  • Replace with:
Check for MMD Title ?
Output Lines That
  • Contain
  • Don't Contain
  • Match Regular Expression:
^Title:.*
Output Format
  • Only Lines
  • Lines and Ranges
Set Variable ?
Variable Name
title
Value
Input
Find ?
Search for
(\d+):(\d+)
Match Group (RegEx)
2
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
startOfText
Value
Input
Generate Text ?
Text
mmdTitleLine
Get the title string ?
Search for
^Title:\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)
Remove Whitespace ?
  • Trim leading/trailing whitespace
  • Remove empty lines
Set Variable ?
Variable Name
mmdTitle
Value
Input
Generate Text ?
Text
title
Find ?
Search for
^Title:\s(\s\w)
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)
Select Range ?
Range (from:to)
startOfText:
Relative to
  • Entire Document
  • Current Selection
Remove Whitespace ?
  • Trim leading/trailing whitespace
  • Remove empty lines
Set Variable ?
Variable Name
text
Value
Input
Select from List ?
Title
List (Lines)
mmdTitle filename
Multiple Selection
OFF
Show in Popover
OFF
Set Variable ?
Variable Name
selectedPostTitle
Value
Input
…End If
Create Post ?
Deselect Text In Editor ?
Range (from:to)
0:0
Relative to
  • Entire Document
  • Current Selection
Show HUD ?
HUD Text
Post selectedPostTitle created!
Duration
  • 1 Second
  • 2 Seconds
  • 3 Seconds
Icon
  • "Success"
  • "Error"