Editorial Workflows

Post to Tumblr

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: Create text posts on Tumblr.

Comments: Comment Feed (RSS)

There are no comments yet.

+ Add Comment

Workflow Preview
Prompt for title ?
Title
Post Title
Initial Text
File Name
  • Single Line
  • Multiple Lines
Keyboard Options:
Save title ?
Variable Name
postTitle
Value
Input
Prompt for tags ?
Title
Tags (Comma Separated)
Initial Text
  • Single Line
  • Multiple Lines
Keyboard Options:
Save tags ?
Variable Name
postTags
Value
Input
Grab the post text ?
Folded Text
  • Include
  • Replace with:
Post it ?
Source Code
#coding: utf-8
import pytumblr
import workflow
import console
import csv

BLOG_NAME = 'myblog.tumblr.com'

POST_BODY = workflow.get_input()
POST_TITLE = workflow.get_variable('postTitle')
POST_TAGS = workflow.get_variable('postTags')
POST_TYPE = 'text'

def main():
	console.show_activity()
	client = pytumblr.TumblrRestClient(
 	 'consumer key',
 	 'consumer secret',
	 'access key',
	 'access secret'
	)
	tags = []
	reader = csv.reader([POST_TAGS], skipinitialspace=True)
	for r in reader:
		tags = r
	params = {'state': 'published', 'format': 'markdown', 'title': POST_TITLE, 'body': POST_BODY, 'tags': tags}
	client.create_text(BLOG_NAME, **params)
	console.hide_activity()

if __name__ == '__main__':
	main()
Notify ?
HUD Text
Post created
Duration
  • 1 Second
  • 2 Seconds
  • 3 Seconds
Icon
  • "Success"
  • "Error"