By Jason Snell
March 25, 2021 1:00 PM PT
Sharing all my shortcuts
This week Apple (hopefully temporarily?) broke the sharing of Shortcuts. I rely on Shortcuts when I’m working on my iPad, and I’ve written about some of them over the years.
Since I’ve got Shortcuts on the brain thanks to Apple’s issues, I thought I’d quickly list (and share) some of the Shortcuts I use the most, in case readers are interested in seeing how they work and could possibly apply them to their own workflows. (I realize some of these will be extremely specific, since only two people write regularly for Six Colors and I’ve already shared them all with Dan.)
Make a Linked List Item. I frequently find articles I want to link to on Six Colors when I’m on my iPad. In fact, it frequently happens in the morning while I’m still in bed, drinking my tea. I select the text I’d like to quote in my link post on Six Colors, then run this Shortcut from the share menu. The result is sent to 1Writer (you could easily change this step to any text editor of your choice). Of particular note is that I’m using the title of the page as the level-one heading, and I’ve added the URL of the page as a Markdown link named
1. From there, I can edit the quote and add my own thoughts before sending on to WordPress.
Make Cross-Promo Post. This is a similar shortcut, but for my own posts on other sites—usually my weekly Macworld column. Since I tend just to quote the introduction of my post, the shortcut bypasses the text editor entirely and jumps straight to WordPress. The selected text in the browser is set as the text, the URL of the browser page is entered in a custom field in WordPress, and the name of the site I’m linking to is entered as a different custom field.
All that content is uploaded to WordPress via XML-RPC. If my user name and password were embedded in this shortcut, it would be a serious security problem—which is why the shortcut (like most of my shortcuts that require authentication) loads the user name and password from a file stored in iCloud Drive. (Still insecure, sort of, I’ll admit, but it gets the job done.) Once the data is sent, the shortcut receives back the WordPress post ID, which it uses to open an editing page in WordPress so that I can verify everything is correct before pressing “Publish.”
Post to Six Colors. I originally wrote this shortcut because I used Movable Type, but even though I’m now on WordPress, I’m still using it! That’s because WordPress also supports XML/RPC, and so I only had to make minor changes to bring my whole iPad workflow compatible.
This shortcut takes text sent from a text editor and sends it to WordPress. Seems simple, but there are some extra tricks here. It looks for a Markdown link named
1 and if it finds it, it sets the post to be a linked-list item rather than a regular post, and inserts the linked URL in the right custom field in WordPress. (This is why the Make a Linked List Item shortcut does what it does.) It also takes level-one Markdown heading, if it exists, and makes it the title of the post.
Upload 6C images. I used to upload images to Six Colors by connecting to a Linode server via SSH and placing them on the server directly. Now that I’m on WordPress, I just connect via the same XML-RPC API and (after resizing the image and saving it as a PNG or JPEG), convert the image to base64 text and insert it in a New Media Object command. In case I’m uploading more than one image, the shortcut displays each image and then asks for a filename. When the job is done, the shortcut takes the resulting URL, wraps it in the HTML I use to insert an image in a Six Colors story, and places the result on the clipboard.
Wrap Paragraphs. I have an AppleScript script that I use all the time in BBEdit to take text with hard line breaks and wrap it all together in one line, with paragraph breaks only coming when there’s a double line break. This shortcut lets me select text in just about any iOS text editor and receive back a wrapped version of that text on the clipboard, ready for pasting.
Resize Image to Clipboard. Sometimes I want to share an image in Slack or iMessage or Discord, but don’t want to wait as an enormous image uploads and is processed at the destination. This shortcut accepts images, resizing them, and puts the scaled-down image back on the clipboard.
Current Temp. I just use this one to boast about California weather to my friends, in Fahrenheit and Celsius. It puts the current outside temperature at my house (via a custom page on my web server, so this one’s not remotely portable) on the clipboard for pasting wherever I want.
(All the shortcut names in this article link to the shortcuts themselves. You’ll need to “allow untrusted shortcuts” in the Shortcuts area of the Settings app in order to download them.)
If you appreciate articles like this one, support us by becoming a Six Colors subscriber. Subscribers get access to an exclusive podcast, members-only stories, and a special community.