Editorial Workflows

MSURLTitle

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: Shorten a WordPress URL using Bitly, tweet, then launch a URL.

Shared by: @viticci

Comments: Comment Feed (RSS)

There are no comments yet.

+ Add Comment

Workflow Preview
Set Variable ?
Variable Name
title
Value
Set Variable ?
Variable Name
url
Value
Run Python Script ?
Source Code
import xmlrpclib
import keychain
import workflow
import console

wp_url = "Link to your xmlrpc.php file"
wp_username = "username"
wp_password = keychain.get_password('website','username')
wp_blogid = ""

console.show_activity('Fetching post...')

blog = xmlrpclib.ServerProxy(wp_url)

result = blog.metaWeblog.getRecentPosts(wp_url, wp_username, wp_password, 1)

workflow.set_variable('url', result[0]['permaLink'])

workflow.set_variable('title', result[0]['title'])
Shorten URL (bit.ly) ?
Set Variable ?
Variable Name
shortened
Value
Input
Generate Text ?
Text
title shortened
Set Variable ?
Variable Name
tweet
Value
Input
Open URL ?
Open in
  • In-App Browser
  • Default App / Safari
URL
shortened
Tab
  • Last-used Tab
  • New Tab
  • Tab with ID:
Unique identifier
Wait until Loaded
OFF
Reveal Browser Automatically
ON
Compose Tweet ?
Initial Text
tweet
Stop if Canceled
ON
Open URL ?
Open in
  • In-App Browser
  • Default App / Safari
URL
tweetbot://
Tab
  • Last-used Tab
  • New Tab
  • Tab with ID:
Unique identifier
Wait until Loaded
OFF
Reveal Browser Automatically
ON