This Week's Sponsor:

Textastic

The Powerful Code Editor for iPad and iPhone — Now Free to Try


Posts tagged with "automation"

Chaining Multiple Apps Together with Drafts

A few weeks ago, I took a look at the automation possibilities opened by Drafts, Agile Tortoise’s multi-purpose text app. In the article, I mentioned how a bug prevented Drafts from “linking to itself” more than once:

Therefore, my idea for cross-posting was: I can link to Drafts itself, and if the first action is successful, I can link to Drafts itself again. Essentially, I wanted to leverage the built-in App.net and Twitter actions to avoid the use of any third-party app. Unfortunately, there’s a bug in the current version of Drafts that doesn’t make that kind of action work.

With an update to Drafts released yesterday, Greg Pierce has brought various improvements to the app, including support for more customizable timestamps and dates using strftime, date and time tags for file names and URL actions, and a new way to encode strings with curly brackets.

Seemingly minor, the option to more easily URL encode strings is actually a very welcome addition: like in the latest Mr. Reader, instead of forcing the user to encode a URL into a longer string, you can simply put a URL inside {{ }} and let Drafts take care of encoding it. It means I can now experiment with building more complex workflows that contain actions for more external apps and, more importantly, for “sequential” tasks in Drafts itself. Easier encoding means we construct URLs that will tell Drafts “do this, and then do that” in a single workflow.

Those who follow me on Twitter know that I’ve been trying since yesterday to see how many apps I could chain together in a workflow, mainly out of curiosity and as a “proof” of concept. First, I tweeted about a Mr. Reader -> Drafts -> Poster workflow that would take selected text from an article, convert its Markdown to HTML, and then send it to Poster; the workflow consisted of three apps chained together, but I knew I could try to accomplish something a bit more ambitious. I kept on experimenting with Drafts URLs, and eventually I managed to build a single workflow with 3 apps and 4 different tasks involved. I’m posting it here for two reasons: a) I believe it’s a quite useful workflow; and b) it can serve as an example of what Drafts can do when you understand how to properly link multiple apps together. Read more


iOS Automation and Workflows with Drafts

The latest update to Drafts – a “quick note capturing” app that I’ve covered several times on MacStories – adds a series of features aimed at increasing the possibilities of workflows automation on iOS devices. Obviously, this is something I’m interested in.

It seems like enabling users to save time while using apps has been a common thread in the past few months. The success of Launch Center Pro probably “raised awareness” in regards to the whole concept of URL schemes, but it’s been the increased adoption of x-callback-url and interest in automated workflows that proves better inter-app communication is something that (at least) third-party developers are thinking about. Google included a powerful URL scheme in Google Maps and Google Chrome; more recently, Mr. Reader showed how to enable a “services menu” by requiring users to mix URL schemes from other apps with parameters for an article’s title or selected text. These aren’t ideal solutions, but it’s all we have for now.

Greg Pierce, creator of the x-callback-url specification, has improved Drafts in ways that not only make the app more useful to get text onto other services, but also broaden the possibilities for automation through the use of URL schemes.

There are three main new features in the new Drafts: Dropbox actions, URL actions, and an improved URL scheme with support for callbacks and action triggers. I am going to explain how they work and include various actions and bookmarklets to demonstrate different use cases. Read more


Due Clipper For Google Chrome

When there are no actual news or notable app releases, I prefer investing my time in creating something for other people.

Continuing my ongoing series of tips on iOS URL schemes, here’s an adaptation of my existing Due bookmarklet to work better with Google Chrome for iOS (which, as I’ve pointed out several times, has a very nice URL scheme). The following code (to install it, simply copy it and paste the entire string into a bookmark) grabs a webpage’s title and URL and sends them to Due (also powered by a great URL scheme). Read more


Mr. Reader And The Services Menu for iOS

A “services menu for iOS” is a chimera advanced users and developers have long been trying to hunt down. It all started with a mockup Chris Clark posted in 2010, showing how third-party iPhone apps could offer their “services” – just like OS X apps – to the user through a contextual menu. The concept became popular fairly quickly, but, eventually, Apple did nothing.

Fast forward to 2013, iOS users are still asking for better integration of third-party apps with each other. Developers have resorted to using URL schemes, a rather simple way to directly launch other apps and pass information to them – usually bits of text. App Cubby’s Launch Center Pro has become the de-facto solution to create a “Home screen of app shortcuts”, offering a series of tools (such as automatic encoding and different keyboards) to make the process of customizing URL schemes as user-friendly as possible. Launch Center Pro is, in fact, the utility behind many of my favorite iOS tricks.

Pythonista has also become a big part of my iOS automation workflow. Combining the power of Python with the possibility of launching URL schemes, I have created a series of scripts that help me get work done on iOS on a daily basis. Further leveraging Greg Pierce’s x-callback-url, I have ensured these scripts can take a set of data, send it to other apps, process it, then go back to the original app. You can read more about Pythonista in my original article, and I’ve been following updates from developers who implemented URL schemes as well with a dedicated tag on the site.

I concluded my Pythonista article saying:

I believe that, going forward, Pythonista and other similar apps will show a new kind of “scripting” and task automation built around the core strenghts of iOS. As we’ve seen, x-callback-url is a standard that leverages a part of iOS – URL schemes – to achieve simple, user-friendly and URL-based inter-app communication that can be used in a variety of ways. Looking ahead, there’s a chance rumored features such as XPC will bring more Mac-like functionalities to iOS, but developers will still find new ways to make iOS more powerful without giving up on positive aspects such as increased security and the simplicity of the app model.

Mr. Reader – a Google Reader client that I’ve covered on MacStories in the past, and my favorite RSS app – has today been updated to version 1.11, which introduces a generic solution for launching URL schemes that shows how iOS automation is a growing trend, albeit substantially different from what we’re used to see on OS X. Read more


Poster 2.0

Tom Witkin’s Poster is my favorite WordPress blog editor for iOS. Poster comes with a clean interface, support for Markdown (the app can convert plain text Markdown to HTML before publishing), and full WordPress integration. The app’s excellent support for WordPress features like custom fields, drafts, slugs, and images means I don’t have to write on the iPad and later “adjust everything” on a Mac before publishing. Poster is, in fact, a core aspect of my iOS automation workflow.

Poster 2.0 is out today, and it’s another fantastic update that reassures me Tom is committed to making this app the best WordPress editor for iOS. The interface has been further refined, and it’s now easier on the eye with an even deeper focus on content rather than UI chrome. I don’t use these for MacStories, but Poster now supports WordPress custom post types and excerpts, alongside the “sticky” functionality that we use every once in a while to pin a post to the top of the site.

What I like about Poster 2.0 are the “minor” additions that make for a much better workflow. Custom fields can now be given a local label so that a friendlier name will be displayed in Poster instead of the actual name (e.g. “URLCustom_linked” becomes “Linked post”); the Markdown preview and HTML conversion now handles en and em dashes (something that annoyed me in the previous version of the app); if you edit a published post (as we usually do when we catch typos or make corrections), you can now save the edited draft locally before publishing. I also appreciate how the “Copy to Clipboard” action now only received a post’s URL (Poster 2.0 builds on the solid foundation of Poster 1.0 for post sharing), and the app is noticeably faster at syncing multiple posts at once.

There are two more changes I want to mention. You can now insert images at any point in the editor by tapping & holding and selecting the “Insert Image” option from the popup menu; I tend to do all my image insertion beforehand, but this is a welcome addition for those times when I may forget about an image. And last, Poster now supports Greg Pierce’s x-callback-url to return to a specific URL after completion. Poster already had support for a URL scheme that allowed post creation from other apps, but now you’ll also be able to create a post and return to another app.

Here’s a bookmarklet I made to grab a browser’s selection and use it as text in Poster, get a webpage’s title and use it as post title, open Poster, and return to the browser. This kind of URL callback enables a streamlined workflow for, say, discovering links in Safari, quickly posting them to WordPress, and going back to Safari again.

javascript:window.location='posterapp:///create?text='+encodeURIComponent(window.getSelection())+'&title='+encodeURIComponent(document.title)+'&callback_url='+encodeURIComponent(location.href);

I also made a quick video showing the process in action. Unfortunately, getting the browser’s selection only works on the iPad.

Poster is a great app, and while not revolutionary, the 2.0 update refines several aspects of the previous version and adds more powerful functionality for WordPress users and iOS automation geeks. I highly recommend it.


“Open In” and Mobile Safari

“Open In” and Mobile Safari

Continuing the discussion about the “Open In” menu for iOS, David Chartier proposes “Open In” for Safari URLs:

Finally, Document Sharing in Mobile Safari would further promote an app-centric workflow on iOS. Bookmarklets are often designed to open another web service in a new browser tab, and let’s face it, working on the web is a crummy experience. But even if they’re wired to open an app, bookmarklets are still a colossal pain to install which cuts off most attempts at the knees. This largely confines Mobile Safari and its content to an island, making iOS’s URL-to-app workflow needlessly tedious for anyone brave enough to try it.

In its current form, Mobile Safari only supports “Open In” for documents displayed in the browser, such as PDFs that Safari can render. The (new in iOS 6) share sheet doesn’t come with options to send a URL around, but only to copy it to the system clipboard.

Bookmarklets were never meant to take off among consumers, because they require a minimal amount of knowledge (or steps) that average users don’t want to deal with. However, developers had to resort to using bookmarklets because it was the only way to provide something that worked to pass a URL from Safari to a third-party app/web service. Some developers have gone out of their way to provide an “Install Bookmarklet” experience that wouldn’t scare off the majority of users.

Overall, “Open In” for links doesn’t sound like a bad idea. Imagine being able to quickly send a YouTube video to Facebook or a link to the Twitter app with an Apple-sanctioned menu and not some JavaScript hack. There are aspects I don’t know how I’d solve right now (How do supported apps appear in the iOS 6 share sheet? Are they available in a dedicated page, or can users re-arrange them? Could Siri be told to perform such actions?), but, generally speaking, providing better web-to-apps communication would be a good start.

Two years ago, Marco Arment offered some ideas on a possible “Send To” panel for Safari. This is absolutely still relevant today, because it hasn’t gotten better.

Obviously, that would be far from my envisioned iOS automation for power users. I’ve been trying the beta release of Alfred 2 lately, and I like how the developers created a workflow visualization that is both powerful and intuitive in the way it connects visually triggers to actions and outputs. Ideally, I’d love to see Apple considering an “Automator for iOS” – the kind of feature that most users don’t care about but that would likely make a subset of them reconsider iPads as “real work” machines. Apple could even go as far as making that kind of user automation look “cool” with the right interface decisions and a powerful inter-app communication layer that is not limited to Apple apps (read: with an API).

I hope this kind of stuff is in the cards for iOS 7.

Permalink

Quick Unit Conversions With Measures and Launch Center Pro

Quick Unit Conversions With Measures and Launch Center Pro

Measures by Michael Neuwert is one of the iPhone apps I’ve been following here on MacStories since I started the site in 2009. I’ve later reviewed (and became a fan) of the iPad version of the app, Measures HD. The latest update to Measures for iPhone, version 2.3, adds more units, iPhone 5 support, and a URL scheme. As you know, automation and URL schemes for iOS apps is something I’ve been focusing on lately, so I was curious to try out the Measures implementation.

A basic Measures URL looks like this: x-measures://convert?from=USD&to=EUR&value=100 – but it’s also possible to simply launch a specific category without starting a conversion by using something like: x-measures://convert?category=Mass. The convert action may also contain a category parameter to avoid ambiguities, and it’s possible to search as well using: x-measures://search?q=Watt.

Being based in Italy but working (remotely) in a US environment, I do a lot of conversions on a daily basis. Primarily currency (EUR to USD and vice versa) and temperature conversions to understand what my colleagues are talking about when they say “it’s cold over here”.

It was very easy to set up a Launch Center Pro action (Measures isn’t listed in the officially supported apps in App Cubby’s launcher yet) to start a Dollar to Euro conversion in Measures using input from Launch Center Pro. Using the first example URL I showed above, replace the numeric value parameter with [prompt-num] in Launch Center Pro. This will ensure that a URL-encoded numeric string will be sent from Launch Center Pro’s number pad to Measures, directly displaying the conversion. In this way, I can keep Measures inside a folder, and create shortcuts for my most-used unit conversions that I’ll launch with a single tap from Launch Center Pro. Thanks to URL schemes, the conversion process will take two seconds and I’ll be shown the final result without having to tap or select anything else.

Currently, there’s no official documentation for Measures’ URL scheme and I’m not sure Michael is using the x-callback-url protocol (though it certainly looks like it). If you’re looking for a quick unit converter you can launch from Launch Center Pro (I was looking for a way to send a browser selection as well, but alas), check out Measures 2.3.

Permalink

PDF Expert 4.4 With PDF Converter Integration

PDF Expert 4.4 With PDF Converter Integration

PDF Expert by Readdle is my preferred PDF reader app for iPad. It comes with a polished UI, various annotation tools, and, more importantly, Dropbox sync. The latest update to PDF Expert for iPad, version 4.4, features integration with Readdle’s other PDF app, PDF Converter. As Readdle describes it:

Anyone who has already installed Readdle’s PDF Converter on the iPad can easily convert any files into PDFs from within PDF Expert. Once you send a document to convert in PDF (action button -> convert to PDF), it instantly converts to PDF and is saved back in PDF Expert for annotation. So far, users that have .doc, .pages, .ppt now can convert these file in PDFs and annotate them in PDF Expert.

I have tried the feature with .rtf files (which I often receive), and it works as advertised. Essentially, it works with a URL scheme that from PDF Expert can forward a document to PDF Converter (if installed); this is done through a “Convert to PDF” menu available in the upper toolbar of the document viewer. Once pressed, PDF Expert will send the document to PDF Converter, which will convert it and automatically send it back. I have asked Readdle whether this kind of integration was achieved using x-callback-url, but they told me they’re using their own implementation called RDIntegration.

I personally run my own remote PDF converter through Dropbox, but the option in PDF Expert works nicely and it’s entirely automated, so check it out if you’ve been looking for something like this on iOS and Readdle’s apps.

Permalink

Audiobus Inter-App Communication On iOS

Audiobus Inter-App Communication On iOS


I’ve been on a personal “quest” to find examples of iOS inter-app communication. I’ve set up workflows with Pythonista and the apps I use, and I’ve searched for apps that have implemented x-callback-url in meaningful ways. I believe Apple will eventually have to address the need of letting iOS apps better communicate with each other with something more powerful than an Open In... menu.

Today I was sent a link to Audiobus. The developers call it an “inter-app audio routing system” – a way to bring music apps together to avoid sending files back and forth between different apps. It is, essentially, a way to record on an iPhone an iPad using the capabilities of multiple apps at once: with a system based on inputs, outputs, and effects, Audiobus routes audio through specific apps and keeps playing audio from different apps in the background. The videos are really the best way to understand the whole concept behind this solution, as it doesn’t look like anything that has been done on iOS before.

I would love to know the technical details behind this. From what I can gather, Audiobus provides an SDK that developers can use to register their apps as input and output sources, or effects. Once registered, Audiobus creates a “workflow” for these apps and displays a “panel” at the side of an iPhone or iPad, showing the apps that are playing in a single session. I don’t think there’s a time limit on background audio, and it appears the side-panel is also capable of stopping audio from specific apps and switching back to them.

I am intrigued by the possibilities offered by a third-party SDK for better iOS inter-app communication: right now, Audiobus already works with apps like Rebirth for iPad, Loopy HD, SoundPrism Pro, and MultiTrack DAW, and more developers will join the program soon. I’m not sure how the panel concept would translate to tasks that don’t involve audio; however, imagine, say, being able to copy a URL from your browser into your text editor without switching back and forth between them. Or getting a file from the Dropbox app embedded into a Pages document without a tedious variety of multitasking gestures and Copy & Paste menus.

Check out Audiobus here.

Permalink