Mr. Reader Actions for Editorial

January 15, 2014 by Gabe | [mmd] |

Thanks again to Mr. Reader for sponsoring Macdrifter. I really can't say enough good things about this RSS reader for iPad. All of themes for the app look gorgeous and the extensibility is unmatched.

Mr. Reader comes with some core actions but the action customization is wide open too. Using placeholder tokens for an article, such as URL, author, title or even selected text, you can create a huge variety of your own personalized tools.

Here's a Mr. Reader action that I pair with an Editorial workflow for grabbing an article and immediately turning it into a draft linked post for Macdrifter.

The Mr. Reader action leverages the Editorial URL scheme. The action sends out the URL, title, author and any text I have selected. The title becomes the the document title and the article title. The selected text becomes a quote.

My articles all start with some front matter like this:

title: My awesome title [Link]
date: 2014-01-13 20:55:00
tags: Link, Sponsor

The Mr. Reader action makes this all possible:




Using the Editorial URL scheme, Mr. Reader passes a formatted block of text to a specific workflow named "MrReader_Link". The text contains the article, URL, Title, Author (if it exists) and any text selected in the article.

Here's where a bit of Editorial-fu comes in. I also want my document named intelligently, using the article title. So I need to get at that URL coming out of Mr. Reader.

I create some variables and then extract the URL and title coming over from Mr. Reader:

#coding: utf-8
import workflow
import re

input_text = workflow.get_variable('incomingInput')
# convert to a list of lines
lines = input_text.split('\n')
workflow.set_variable('urlString', lines[0])
workflow.set_variable('titleString', lines[1])

new_string = '\n'.join(lines[3:])
workflow.set_variable('postBody', new_string)

Once I have those values saved to variables, I can go ahead and create the new Dropbox document with some more Python:

#coding: utf-8
import workflow
import os
import editor
import datetime
import webbrowser
import urllib

local_path = os.path.expanduser('~/Documents')

doc_title = workflow.get_variable('titleString')
doc_body = workflow.get_variable('postBody')
link_url = workflow.get_variable('urlString')
file_current_time ='%Y-%m-%d_%H%M%S')
meta_date ='%Y-%m-%d %H:%M:%S')
file_name = doc_title + file_current_time +'.txt'

file_content = 'title: '+doc_title+'\nlink: '+link_url+'\ndate: ' + meta_date + '\n\n\n' + '[' + file_current_time + ']: ' + link_url

editor.set_file_contents(file_name, file_content,'dropbox')'editorial://open/' + urllib.quote(file_name) + '?root=dropbox')

action_in = workflow.get_input()

#TODO: Generate the output...
action_out = action_in


In this case, an article that looks like this:

Is transformed into a new document in Dropbox that looks like this:

Notice that the file was named with the article name and it provides an option to modify the name along the way. The link is added to the header data and as a reference link using a time stamp marker.

You can install the Editorial workflow from here.

You can download the companion Mr. Reader action here. Just install Mr. Reader and it will install automatically.

The Mr. Reader URL actions are one of my favorite features of the app. Sure, it's beautiful and fast, but it's also incredibly flexible. It's also one of my favorite apps on the iPad.

Older articles

  1. Taking Action on Feeds with Mr Reader for iPad [Sponsor]

    December 30, 2013 by Gabe | [mmd] |

    My thanks to Mr. Reader for sponsoring Macdrifter this week. It's my preferred news reader on any platform, thanks to the elegant design and powerful actions. It also supports a huge variety of RSS aggregation services so it's likely you can start using it today.

  2. Bookmarker Macros for Editorial

    December 28, 2013 by Gabe | [mmd] |

    This pair of macros for Editorial brings a whole new level of bookmarking to text files on the iPad. Ever want to bookmark a specific spot in a text file or remember where you left off editing a text file in Editorial? Me too. So, I created this pair of ...

  3. Color on the Retina iPad Mini [Link]

    November 17, 2013 by Gabe | [mmd] | ℳ↫

    As always, Anandtech gets into the details where other reviews do not.

    The iPad mini with Retina Display has the same color gamut as the standard iPad mini, which is narrower than the iPad Air and less than the sRGB coverage we normally look for. The biggest issue here is ...

  4. iPad Mini Available Now

    November 12, 2013 by Gabe | [mmd] |

    Apple finally alleviated the supply constraints on wheelbarrows for moving their cash. The iPad Mini is available now.

  5. Mr. Reader 2.0 Adds New Sync Services [Link]

    June 26, 2013 by Gabe | [mmd] | ℳ↫

    Mr. Reader 2.0 is out today and adds a handful of supported sync services.

    • BazQux Reader
    • Feedbin
    • FeedHQ
    • Feedly
    • Feed Wrangler
    • Fever

    It's a great start and just in time for the final death rattle of Google Reader.

  6. Dropbox and Photos: Two iOS Apps

    January 31, 2013 by Gabe | [mmd] |

    I keep most of my photos archived in an Aperture library. But I also have a good size collection in Dropbox. I'm not likely to move completely to Dropbox for my photo collection. It's much too large and I really like the benefits I get with Aperture. Dropbox ...

  7. The Benefits of Mr. Reader

    January 27, 2013 by Gabe | [mmd] |

    Viticci made me switch from Reeder to Mr. reader on iOS with clever tricks and high praise (see the Macstories review as well). But, believe it or not, I didn't switch for the URL scheme support. I switched for the better reading experience.1

    Here's a quick tip ...

  8. 100 Word Review: Handcrafted App

    October 24, 2012 by Gabe | [mmd] |

    Shhh. I have a secret. I shop on Etsy occasionally. I'm not crafty by nature. I loathe wicker, cringe at paper-craft and detest all things knit. But I like Etsy. I've found some wonderful pieces of art and great iPhone and iPad accessories. The best experience I've ...

  9. JSON Designer App

    October 10, 2012 by Gabe | [mmd] |

    JSON Designer is another nice little developer utility. It's not earth shattering but it is useful.

    At a most basic level, JSON Designer provides an interface to visually create and dissemble JSON structures. The interface is attractive and easy to orient. It feels a lot like iThoughts HD but ...