Push to Ulysses Workflow

Push to Ulysses (v1.1): A minor update to my link composing workflow. The update features my new writing template — originally discussed in Launch Ulysses Workflow — that’s designed to work with my upcoming WordPress publishing workflow, which I plan to share in the coming weeks.

In short, the new template lets me save URL slug and tag information within a Ulysses sheet. And the new publishing workflow is able to grab that information and pass it to WordPress with minimal interaction. It’s a major improvement over my original Push to WordPress workflow.

Push to Ulysses (v1.1) no longer uses X-callback-URL to send information to Ulysses and, instead, incorporates Workflow’s Ulysses actions — introduced in version 1.5.

If you’re interested in learning more about this workflow, links to the original version and my initial write-up explaining the thought process behind it will remain below.

—June 24, 2016

 

As many of you know, I’ve just recently started using Workflow to automate various tasks. I’ve only built a few of my own workflows so far, but it’s quickly becoming my favorite iOS app. Not only does it help me improve my productivity, it’s also incredibly fun to use — who doesn’t love hacking together Rube Goldberg-like systems and seeing if they work?

My use of Workflow quickly accelerated when I made the decision to reorganize my bookmarks a couple weeks ago. I realized that I had all these bookmarklets that weren’t necessary anymore. Most of them had been replaced by native iOS apps with action extensions. And not only were these action extensions more intuitive to use than my old bookmarklets, but I could easily manage them on my iOS devices and add new ones to boot.

There was one glaring exception, though, WordPress’ Press This bookmarklet. This often-overlooked feature is what has fueled Initial Charge’s Linked List since it was first introduced in 2011. Nearly every link published to this site began by clicking (or tapping) the Press This bookmarklet in Safari’s Favorites bar.

But it’s finally time for a change. The Press This bookmarklet worked, but it was never really well suited for the task. I had to use a couple of WordPress plugins — CF Setter and Slugger+ by Justin Blanton, both of which are great — in order to bend the simplistic compose window to my will. But even then, it still wasn’t as smooth as I always wished it to be.

Every single link was an exercise in frustration. This is what I went through with every link I published to the site:

  • Delete all of the text automatically generated by the Press This bookmarklet.
  • Edit the title and run it through TitleCap.
  • Copy and paste whatever bits of text I was quoting.
  • Write my own thoughts about the topic.
  • Type out the CF Setter and Slugger+ tags — which was made easy with iOS’ Text Replacement feature.
  • Copy and paste the URL in between the CF Setter tags.
  • Write out the piece’s slug in between the Slugger+ tags.

This took a considerable amount of time and was just begging to be automated. At first, I considered hacking the Press This bookmarklet in an attempt to streamline the process. I tried a few different approaches, but could never quite get what I wanted out of it. That’s when I turned to Workflow.

I decided to abandon the Press This bookmarklet altogether and move to a more modern process — giving me an opportunity to start using Workflow for more serious tasks and write full time in Markdown with Ulysses.

It may be hard to believe, but I had only dipped my toes in the water with Markdown. I tried to implement it in my writing process last fall when I attempted to use Editorial for my longer-form writing. For whatever reason, the app never sat well with me. And to this day, I can’t put my finger on why. Markdown, on the other hand, was great. I just never had any use for it in WordPress’ editor.

More recently, I started slowly moving toward Ulysses for my longer-form, Feature Articles. I loved the app, especially since it was finally available for the iPhone. And this move away from the Press This bookmarklet was a great opportunity to cement The Soulmen’s text editor as my primary writing tool for the site — going all-in on Markdown along the way.

For the foreseeable future, everything published on Initial Charge will be written in Ulysses. And Workflow will be there to help streamline the entire process. Today, I’ll be sharing my Push to Ulysses workflow, which is used to transition from looking at an interesting webpage to writing about that webpage.

I’ve already started building a workflow for publishing to Initial Charge from Ulysses, but it’s very much a work-in-progress. It functions, but in the past day alone it’s undergone some pretty significant changes. I will be sharing it in the future, but I’d like to do some more testing and smooth out the rough edges before I release it to the world.

The Workflow

I need two pieces of information from a given webpage in order to get started writing a link — the page’s title and URL. The title typically ends up changing and often needs to be properly capitalized, but I use it as a starting point that I can then craft into my own. The URL will eventually end up in a custom field which the Daring Fireball-Style Linked List plugin uses to differentiate between links and articles.

I had considered adding the ability to transfer selected text from the webpage into Ulysses — most of the links I publish on the site include a quote from the originating article. But after doing some testing, I realized that I don’t usually find the block of text I want to quote until after I’ve already decided to link to it. Perhaps this will return in a future version, or maybe I’ll find a way to use Ulysses’ X-Callback-URL support to append the quote to an existing sheet (which was added in version 2.5), but for now I’ll let copy and paste do all the heavy lifting.

Push to Ulysses is activated from within the “Run Workflow” action extension, while viewing a webpage, and performs the following process:

  • Save the webpage’s URL to a variable called “Link”.
  • Get the name of the webpage from Safari, properly capitalize it with Workflow’s “Change Case” action, and set it as the variable “Title”.
  • Input the variables into my Markdown template with the title set as header 3.
  • URL encode the template and set it as the variable “Content”.
  • Input the encoded template into a Ulysses X-Callback-URL and open it.

This gives me a new sheet in Ulysses with the title, properly capitalized, on the top line and the webpage’s URL on the bottom. From there I can begin writing my commentary in the template’s white space. It’s important that I write in between the title and the URL because the publishing workflow I’ve built expects those two pieces of information to be at the beginning and end of the document.

I’ve been publishing links to Initial Charge all week with this workflow and it’s been an absolute joy to use. Even though I’ve been using the iPad Air 2 as my primary computer for over a year, it’s never felt more powerful than it does today. Using Workflow to string together multiple applications has felt revolutionary to me. I have plenty of experience with apps like Alfred and Automator — both of which are capable of incredibly powerful things — but I never managed to build the type of intricate systems like I have with Workflow.

And that’s not to ignore the importance of Ulysses and Markdown to my newly revamped writing process. It’s been a long time since I’ve had this much fun writing. Don’t get me wrong, I’ve always enjoyed it, but Ulysses’ beautiful user interface and the simplistic nature of Markdown’s syntax has made writing downright delightful again.