A couple of weeks ago I mentioned that I was getting back into the habit of sharing interesting links here. Over the years, I’ve come up with, and written up, a number of different ways of pulling info from the web and shoving it into posts I want to share with the world. But this time I wanted to create something I could use entirely inside iOS.
The majority of my actual reading these days happens on my iPhone, via Pocket, Reeder, or a web browser. Because of this, I knew I needed to come up with an iOS Shortcut that would let me push—from anywhere—interesting things to a post of links, and to have the behavior be consistent no matter from which app I invoke it (e.g., Pocket, Chrome, Twitter, etc.).
The Shortcut I developed allows for this consistency, and also takes into account whether I want to share an excerpt from the article, which is governed by whether or not I previously copied some text from the article. And again, it doesn’t matter from which app/site you’re invoking the action in the Share Sheet.
The logic of the Shortcut is pretty straightforward, and likely instantly gleanable from viewing the Shortcut itself, but for completeness’ sake, I thought I’d outline the steps here:
- Receive a URL as an input (from the Share Sheet)
- Pass the title of the received URL to Text Case and convert it to “Sentence Case,” which basically ensures that the first word is the only word capitalized (which means in many cases I’ll need to look at this manually and correct as needed, but in aggregate it saves me a ton of time)
- Convert the title and URL into a Markdown link
- Ask whether the clipboard should be pasted into the to-be-shared text (i.e., did I copy to the clipboard an excerpt from the article that I’d like included when I share?)
- Generate the full link text (including excerpt if called for) and copy it to the clipboard
Note that in the Shortcut I shared, there’s one additional step at the end, namely the launching of iA Writer. You can change this to another app or delete it entirely. Unfortunately, iA Writer—my writing app of choice for Mac and iOS—has no Shortcuts support (yet), and so the most I can do is launch the app and then find the post to which I’m looking to add this new link.
Some writing apps have a ton of Shortcuts support, like Ulysses, whereby you can append your new link to the end of a specific file, without ever having to open the app. This, of course, is ideal, but on its own it’s not enough for me to switch back from iA Writer (or to any other app that doesn’t yet support that sort of thing).
If interested, you can grab the Shortcut here.