Do you write your blog posts on an iPhone or iPad? Do you have a WordPress blog?
If so, and you wish it were easier / quicker to insert good-looking stock photos into your posts, here’s an automated little workflow I made to speed the process up, called “Unsplasher.”
I modestly think it’s rather good: it combines the power of the Drafts App with the Workflow App. Like most automations, it was a little tricky to set up the first time, but, now that it has been set up, my blogging has become a lot easier.
It works like this:
- You are happily writing a blog post in Drafts.
- You decide to include a cool image.
- You type a keyword to describe that image, like “Fire,” for instance, and you highlight that word or phrase.
- You run the “Unsplasher” Drafts action from your lists of actions, and this triggers the “Unsplasher” Workflow, which searches the elegant, free to use, royalty-free stock photography site Unsplash using the word you highlighted as the search term. (This search is made possible by the clever “bangs” that DuckGoGo’s search engine has built).
- The workflow pauses itself while you make your choice. You choose an image, click on it, click again to reach the download screen, and from there save it to your iPad or iPhone. You then close the web viewer by clicking the “done” button on the top left of the window. This action resumes the workflow.
- The workflow then shrinks the image to 800 pixels wide, uploads the image to your WordPress library, and moves the image that remains on your device to a specific “Unsplash” photo album.
- The workflow then produces the full HTML code for inserting that image into a blog and returns you to your original draft in Drafts.
- Drafts then removes the original text you wrote (“Fire”) and replaces it with the full link to the uploaded image.
As a result, the process of searching for, uploading, and HTML-ifying a photograph is reduced to a few clicks.
It works really well.
Here is the first result that comes back when you search Unsplash for “Hipster.”
(If you like the idea of an automated image searcher / uploader, but don’t use Drafts, here is a variant of the Unsplasher workflow, “Unsplasher Alone,” which does everything the same but is a standalone process: you could trigger it from the notification screen or from the Workflow app itself, and then simply paste in the code to whatever writing app you’re using.)
My previous two posts about writing on the iPad have been very popular — Blogging on an iPad and Writing on the iPad Just Gets Better — so I thought I would share some of the more recent Workflows I’ve made.
Earlier this year, I made a decision to blog more regularly.
I disliked how I would sometimes get overwhelmed by life for a week (or three) and leave the blog quiet. So I tried to work out what aspects of blogging slowed me down.
The writing wasn’t necessarily the problem (because most days I happily write something opinionated on Facebook), and nor was the coming up with things to write about (because I’m always reading new essays and books).
Instead, what slowed me down, I felt, was the specifically “blogging” part of blogging, the work required to turn a page of text into a post. This includes:
- Searching for links and inserting them.
- Searching for images and uploading them / pulling their HTML address from my existing WordPress library.
- Formating the post with categories and tags.
- Any extra Markdown or HTML required.
As I described before, I was already using Drafts to automate most of my basic HTML writing.
But I wanted to do more. And recently I was inspired by the work of Tim Nahumck and Jeff Mueller, who have been using the combination of Drafts and Workflow to create some very clever short cuts.
Drafts can run an operation on a small piece of selected text; Workflow can perform complex pre-set processes on that selection, and then return you to Drafts to continue working.
This combination can produce some powerful effects.
For instance, in “Lazy Markdown,” Mueller created a Workflow workflow and Drafts action combo to allow a blogger to put in a place holder for a link as she writes and then, when the post is finished, search for and insert the HTML links all in one go.
Last week, my internet-buddy Sam asked for a workflow that would scan some text for incomplete Markdown links and present a way to fill in the missing URLs. The links look like this:
Something \[to link to\]\(\).
The goal is to let you write without having to stop what you’re doing to hunt down a URL. You can be lazy. This is my kind of challenge.
The way this works is that you write your blog post in Drafts, but rather than stop each time you need to write a link, search for the link’s address, and paste it in, you simply write a placeholder with the name of the linked page in brackets, such as:
[New York Times]()
When you’re done writing the post, you trigger the Drafts Action, and the related workflow examines the full text of the draft, spots any examples of word, and launches a web search with [word] as the search term.
Browse to the URL you want to link to, copy it, and return to Workflow. The copied URL will be placed into the appropriate Markdown link, and you’ll be asked to fill in the next link. This search-and-insert process continues until the end of the document is reached.
Nahumck then created a very clever variant of Mueller’s design.
This really impressed me.
However, I’m even lazier than Mueller and Nahumck. I don’t want to type out square brackets if I don’t have to. So I created a slower but simpler version of their workflows, which I call “MD Link Builder.”
You simply highlight some text in a draft, such as run the action, and Workflow runs a search with that word or phrase. You copy the address, and Workflow then inserts that address as the link, and the original phrase as the name of the link.
New York Times
[New York Times](http://www.nytimes.com/)
This means that if I’m working on a blog post, and I feel like linking to an old post or page on this site, I can simply type in its title — How I Teach College-Level Writing, for instance — select the phrase, run the “MD Link Builder” workflow, and voila: How I Teach College-Level Writing. If the search launched by that phrase doesn’t immediately return the right page, I can search again from within the web viewer.
The link is created in easy-to-read Markdown, which, when you post to your blog with a workflow like my “Publish Complete Post,” is automatically converted into web-friendly HTML. Not bad.
Here, to round this post out, are two more workflows:
Number four: Unsplash.com is a useful site. But what if I want to include in my posts the image of a book cover, or an author photo? For those, I use a “Google Imager” workflow and associated Drafts action which works the same way as the Unsplasher, but which searches Google in general.
Number five: What if you have already uploaded an image to WordPress.com, and would like to quickly reuse it (rather than uploading a new file and using up your storage allowance)? I made a “WordPress Photo Library” workflow which I hesitantly share here: it is not the easiest to use. It pulls up your WordPress photo library in Safari, and you simply copy the web address of one of the pictures there. Currently, the only way to select the address is with an attached bluetooth keyboard and the select-all shortcut: clearly, this is not ideal. I feel like there must be a better way to do this, and if Mueller or Nahumck have suggestions, please let me know!
Does all this sound interesting? Crazy? Pointless?
If it does sound interesting, and you would like some links to help you understand the basics of these apps (they are powerful, and take a little while to figure out), leave a comment and I’ll provide suggestions 🙂