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)
http://editorial-app.appspot.com/workflow/5853676023316480/fM1Ff_dYwQg

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.
http://www.editorial-workflows.com/workflow/5282583080337408/GC77290lJ_E

+ Add Comment

Workflow Preview
Generate Text ?
Text
Browser URL
If… ?
Run the block if
Input
  • 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
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)

workflow.set_output(action_out)
Set Clipboard ?
Show HUD ?
HUD Text
Markdown Copied
Duration
  • 1 Second
  • 2 Seconds
  • 3 Seconds
Icon
  • "Success"
  • "Error"