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.
This workflow lets you leave the URL out of your Markdown links until you’re ready to publish. When you run it, you’ll be prompted to fill in each missing URL.
If you choose to find a URL, you’ll be sent to a Google search for the link’s text in Safari to get you started.
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.
If you write with Drafts, this action will run the workflow on your current draft. Once you’re done filling in the links, it’ll create a new draft with the URLs in place (while automatically deleting the original draft).
- Search, which works as above, but Tim uses the Safari View Controller so you’ll never have to leave Workflow. Use the Share menu to copy the page’s URL.
- Enter a URL manually.
- Blink search for finding iTunes affiliate links.
Note that using Blink requires you to use the latest version of Workflow, as that functionality just shipped today.
I love these workflows because they let me focus on writing. The research can come later.