Editorial Workflows

Extract URLs 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: Extracts all of the URLs in the current document to a set of markdown references and places it on the pasteboard.

Modify the "Filter Lines" action to remove links of a specific format from the list.

::: Macdrifter.com ::: v1.0

Shared by: Macdrifter.com

Comments: Comment Feed (RSS)

There are no comments yet.

+ Add Comment

Workflow Preview
Document Text ?
Folded Text
  • Include
  • Replace with:
Extract URLs ?
Output
  • Only URLs
  • URLs and Ranges (Separated by Tab)
Set Variable ?
Variable Name
extractedURL
Value
Input
Filter Lines ?
Output Lines That
  • Contain
  • Don't Contain
  • Match Regular Expression:
http://www.macdrifter.com/uploads/
Output Format
  • Only Lines
  • Lines and Ranges
Remove Duplicate Lines ?
Run Python Script ?
Source Code
#coding: utf-8
import workflow

action_in = workflow.get_input()
all_links = []

split_text = action_in.split('\n')


for line in split_text:
	md_link = "1. ["+line+"]("+line+")"
	all_links.append(md_link)




action_out = '\n'.join(str(elem) for elem in all_links)


#print action_out

workflow.set_output(action_out)
Set Clipboard ?
Show HUD ?
HUD Text
Reference section placed on clipboard
Duration
  • 1 Second
  • 2 Seconds
  • 3 Seconds
Icon
  • "Success"
  • "Error"