Editorial Workflows

Convert to HTML

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: This workflows converts the current Markdown document to HTML and saves the content to a file next it.

Comments: Comment Feed (RSS)

There are no comments yet.

+ Add Comment

Workflow Preview
Document Text ?
Folded Text
  • Include
  • Replace with:
Run Python Script ?
Source Code
#coding: utf-8
import workflow
import cgi

action_in = workflow.get_input()

action_out = cgi.escape(action_in).encode('ascii', 'xmlcharrefreplace')

workflow.set_output(action_out)
Convert Markdown ?
Markdown Extras: Footnotes
ON
…Auto-Links
ON
…Strikethrough (~~x~~)
ON
…Superscript (^x)
ON
…Tables
ON
…Smart Quotes etc.
ON
…Strip Metadata Headers
OFF
Set Variable ?
Variable Name
converted
Value
Input
Run Python Script ?
Source Code
#coding: utf-8
import workflow
import editor
import os

converted = workflow.get_input()
path = editor.get_path()
base = os.path.split(path)[1]
newfile = base + '.html'

editor.set_file_contents(newfile, converted, 'dropbox')

workflow.set_output(newfile)
Show HUD ?
HUD Text
Saved! Input
Duration
  • 1 Second
  • 2 Seconds
  • 3 Seconds
Icon
  • "Success"
  • "Error"