Before I wrote my previous post, I put out a call on Twitter for an iOS app that cleans short links and that also supports x-callback-url. After all the work of adapting a Pythonista script to resolve a short Dropbox link, I finally received a response from @malanowski: Clean Links. Although I cannot find any x-callback-url documentation on the web, there is documentation in the app itself.
I’ve now written a Launch Center Pro action that does the exact same thing as described in my previous post but without the hassle of creating a script in Pythonista. All you have to do is tap on this link while on your iPhone and install the action in Launch Center Pro.
Take a photo, tap on the LCP action, and your shared Dropbox image is available for publication in Markdown format in TextTool. From there you can tap on
Open In... to send to your favorite text editor.
The Geeky Details
This action uses three
x=success parameters, each of which is URL-encoded. The final TextTool transform is tripe-URL-encoded.
First, LCP adds the last-taken photo to Dropbox — by default to
/Apps/Launch Center Pro/photos and makes the URL shareable. It is offered in a short URL (
db.tt). This URL is sent to Clean Links, and the resolved URL is sent to TextTool. TextTool uses the
replace method to swap
dl. It then takes that output and adds the Markdown elements (
Here are each of the
x-success parameters URL-decoded.
This is encoded once:
This is encoded twice:
This is encoded three times:
And actually the Markdown elements are encoded in the above action: