Editorial Workflows

Open Pinboard Link

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: Displays a selection list of recent Pinboard URL's. Selecting one opens in the Editorial Browser. Supports situations where the title includes a URL as well and presents a second selection list with the multiple URL's.

::: Made by Macdrifter
::: v1.0

Comments: Comment Feed (RSS)

There are no comments yet.

+ Add Comment

Workflow Preview
Run Python Script ?
Source Code
#coding: utf-8
import workflow
import console
import keychain
import pickle

login = keychain.get_password('pinboard.in', 'editorial')
if login is not None:
	user, pw = pickle.loads(login)
else:
	user, pw = console.login_alert('Pinboard Login', '')
	login = pickle.dumps((user, pw))
	keychain.set_password('pinboard.in', 'editorial', login)

import requests
import json
pinboard_url = 'https://api.pinboard.in/v1/posts/recent?format=json&count=50'
r = requests.get(pinboard_url, auth=(user, pw))
data = json.loads(r.text)
posts = data['posts']
out = ''
for post in posts:
	title = post['description']
	url = post['href']
	link = '[%s](%s)' % (title, url)
	out += title + '\t' + link + '\n'
if len(out) > 0:
	out = out[:-1]
workflow.set_output(out)
Select from List ?
Title
List (Lines)
Input
Multiple Selection
OFF
Show in Popover
OFF
Extract URLs ?
Output
  • Only URLs
  • URLs and Ranges (Separated by Tab)
Set Variable ?
Variable Name
urlSelection
Value
Input
Count ?
What to Count:
  • Words
  • Sentences
  • Lines
  • Characters
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
1
Select from List ?
Title
Found Multiple URL's
List (Lines)
urlSelection
Multiple Selection
OFF
Show in Popover
OFF
Set Variable ?
Variable Name
urlSelection
Value
Input
…End If
Open URL ?
Open in
  • In-App Browser
  • Default App / Safari
URL
urlSelection
Tab
  • Last-used Tab
  • New Tab
  • Tab with ID:
Unique identifier
Wait until Loaded
OFF
Reveal Browser Automatically
ON