Editorial Workflows

Web to MD

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: Downloads the HTML of the web page that is currently open in the in-app browser, converts it to Markdown, and copies the result to the clipboard.

Shared by: @olemoritz

Comments: Comment Feed (RSS)

ClareMacrae — 21 Nov 2014
This works really well. Thank you very much.
Tutorial Doctor — 22 Nov 2014
A much shorter technique than the one used by the workflow I posted earlier (by Aaron Swartz)

But this workflow leaves out a lot of information. It also crashed. How does this code work so that I could edit it? Where does the conversion happen?
Tutorial Doctor — 22 Nov 2014
Scratch that, the page I used was bad. It works about as good. Nice one Ole.
Tutorial Doctor — 27 Nov 2014
Modified it slightly to automatically create a new document from the Webpage with browser title.

+ Add Comment

Workflow Preview
Generate Text ?
Browser URL
If… ?
Run the block if
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Stop ?
  • This Workflow
  • Repeat Block
Show HUD Alert
No Web Page in Browser
…End If
Run Python Script ?
Source Code
#coding: utf-8
import workflow
import requests
from html2text import html2text

action_in = workflow.get_input()
r = requests.get(action_in)
html = r.text
action_out = html2text(html)

Set Clipboard ?
Show HUD ?
HUD Text
Markdown Copied
  • 1 Second
  • 2 Seconds
  • 3 Seconds
  • "Success"
  • "Error"