This week's sponsor

Posts tagged with "drafts"

Drafts 5 was recently updated to version 5.4, which brings a host of new features. While there is support for iOS 12's Siri shortcuts and all that they have to offer, there are also other important features that have improved the app's capabilities significantly.

Editor’s Note

Every year, we publish around 60 issues of MacStories Weekly and the Monthly Log for Club MacStories members. MacStories Weekly is packed with our favorite apps, app collections, advanced shortcuts, answers to Club members’ questions, iPads Around the World, which features people who use the iPad in unique and interesting ways, interviews, home screens, tips, and more. You can read a free sample here.

The Workflow Corner is a column of MacStories Weekly where I explain and share custom shortcuts (i.e. workflows) for Apple's Shortcuts app, as well as scripts and other automation techniques for other iOS apps. With my iOS 12 review on the horizon, I thought it would be useful for MacStories readers to learn how I've been using Drafts 5 to organize the chapters of the review and back everything up to multiple external locations. The following post has been adapted from the Workflow Corner section of Issue 133 of MacStories Weekly.

If you enjoy MacStories.net but want even broader and deeper coverage from the MacStories team, please consider joining Club MacStories. As a new member you’ll receive the newsletters, have access to our full archive of almost 200 back issues, and enjoy other perks throughout the year. We work hard to make each issue special for Club members and would love for you to be a part of it.

Back in June, I wrote on MacStories that I was evaluating whether Drafts 5 could replace Editorial for my Markdown automation and become the app I use to write my annual iOS review. Putting together these longform pieces involves a lot of writing, editing, and navigating between different sections; the more I can automate these tasks, the more time I can spend doing what actually matters for the review – testing the new version of iOS and ensuring the review is up to my standards.

Once I started looking into Drafts 5, I realized I could take advantage of its JavaScript automation engine to build a custom action that would compile the latest version of my iOS review draft and back it up to multiple locations as a single Markdown (.md) text file.

The way apps like Fantastical actually integrate with the system calendar in iOS is via an API which allows direct manipulation of calendar events. You may have seen the Allow app to access the Calendar? prompt when first launching apps which use this. Drafts integrates this API into its scripting capabilities, and so it occurred to me recently that perhaps I could build a similar functionality within Drafts using JavaScript. This would allow me to use the system calendar app, which I prefer aesthetically over Fantastical, while retaining the ability to enter events in natural language.

What I’ve ended up creating has almost all of the same functionality as Fantastical, but since it does not rely on launching an external URL scheme, is considerably faster. You can enter multiple events, each on a different line, and have them all instantly added to your calendar without even launching another app.

He used chrono.js, which is a natural language date parser written in JavaScript that he adapted to Drafts 5. This allows you to write something like "Monday at 2 PM" and the Drafts action will correctly interpret it as a date and time. This is not the first time Davison-Reiber created a Drafts 5 action based on chrono.js either – you should check out his natural language Things parser too, which takes my original idea and makes it even better and easier to use in Drafts.

When writing my review, I needed a way to navigate between the different sections, and all of the subheadings I had created. I had developed an action to navigate to each of the markdown headers, which I was happy with at the time. It was nice to have that functionality to switch around where I was in my review.

In the upper right corner of the editor, there is a small triangle icon; when you tap the icon, you are presented with a navigation menu. Not only does this navigate headers in Markdown, but it also navigates projects in TaskPaper, and code blocks in JavaScript. It also include a top and bottom button, as well as a select all button.

Drafts 5.2 came out while I was in San Jose for WWDC, and I've been meaning to check out the new features since I started getting back into a normal routine. Tim Nahumck, of course, has a great overview of the changes in this version of Drafts, along with some useful examples you can download.

As Tim points out, the ability to navigate headers of a Markdown document through a dedicated "section popup" is a terrific addition to Drafts. Few text editors designed for people who write in Markdown get this right; one of the reasons I still keep Editorial on my iOS devices is because it lets me navigate longer pieces with a header navigation tool. However, the implementation in Drafts 5 is more powerful, modern, and can be controlled with the keyboard (you can invoke the switcher with ⌘\ and, just like Things, dismiss it with ⌘. without ever leaving the keyboard).

Speaking of Editorial, every update to Drafts 5 is pushing me toward converting all my old Markdown workflows to Drafts actions powered by JavaScript. Automation in Drafts involves a lot more scripting than Editorial's visual actions, but I feel like Drafts 5 is a safer bet for the future. I've been putting this off for a long time; maybe I should spend a few days finalizing the process before I start working on a certain annual review.

There are few apps I've ever used which made a lasting impact on my daily workflow. But for years now, the singular app that's been the foundation of my iOS use has been Drafts. The app has lived in my dock since I first picked it up, it's the single most important app I use on the platform, and it's the only paid app I mandate to anyone looking for must-have apps on iOS.

Drafts is the bedrock app from which I build all my productivity. It’s the single point of text entry that shares to any app, whether through the share sheet, a simple action, or a custom and complex action. Any time I have an idea, I put it in Drafts. Tasks to add to my task manager? I do that from Drafts. Something I want to write about on my blog? That idea starts in Drafts too. It's the focal point for everything I do.

But times change. Apps age. New features are added in the OS that need to be integrated, which cause some developers to pull the plug. So today, I'm saying goodbye to Drafts 4. And it's getting replaced by the only app that could possibly replace it: Drafts 5.

David Sparks, who has made screencasts for companies like The Omni Group and Smile Software, does a great job of showing how easy it is to get started with Drafts, but also exposing some of the powerful ways Drafts can interact with other apps like Dropbox.

A great update to Drafts was released earlier this week, and it's got some interesting changes for users who manage a lot of notes or save bits of text in the same notes on a regular basis.

The Drafts extension can now offer to append/prepend whatever it receives (some text, a URL, etc.) to existing notes – useful to keep a running list of items without ending with multiple notes or having to merge them manually every time. This is useful for me when I want to assemble lists of links I can use for MacStories or Relay.

The Drafts Share extension (used from the Share sheet in other apps) now supports appending and prepending to inbox drafts as well as capture of new drafts. To use these options in the share sheet, tap the “Append” or “Prepend” buttons at the bottom of the window and select the draft to add the text to.

You can also run an action on multiple notes at once now:

When using the “Select” and “Operations” options below the drafts list, there is now a “Select All” option to quickly select all drafts in the current tab, and a “Run Action” operation to apply an action to multiple drafts. “Select All” is particularly useful to quickly archive all drafts in the inbox, for example. The “Run Action” operation lets you quickly select multiple drafts and run an action on them. When selecting this operation, the action list will be shown to select the action to run. Some actions (such as ones that leave Drafts) are not supported for multiple selections and will be grayed out in the list.

The most impressive aspect of Drafts is how Greg Pierce manages to keep the app simple and powerful at the same time with features that are there but not in the way. That's an exercise of restraint and good design that can't be appreciated in other apps. Drafts is $9.99 on the App Store.

I missed this last week, but Drafts has been updated with a useful Workflow integration to easily create actions that can trigger workflows with text. From the Agile Tortoise blog:

Drafts 4.1.2 has added a new “Run Workflow” action step to provide integration with Workflow app from Desk Connect. This step makes it easy to fire an workflow in Workflow app with a single tap. The action step can be configured with the name of a workflow, has a template to construct the text sent to the workflow and optional flag for whether to return to Drafts after execution. Under the hood, Drafts is constructing x-callback-url URLs to trigger the workflow, but this makes it much easier for the novice user than constructing them yourself in Open URL action steps.

Similarly, the latest version of Workflow has added a shortcut to create a Drafts action:

As an added bonus, the latest update of Workflow has added an option, when viewing settings on a workflow, to “Add to Drafts”, which will open Drafts and automatically create an action, setup with a “Run Workflow” action step, ready to go. This feature will be rolling out over the course of the next couple of days, so if you do not see it immediately in Workflow, try again later. For more details, read the Run Workflow action step documentation.

I'm using this to quickly send links copied from Twitter (which still doesn't support the iOS 8 share sheet) to Workflow via Drafts, and it works well.

A few months ago, I wrote about trying to capture pieces of text via extensions and merging them in a single note. Given the lack of an iOS 8 extension capable of directly appending text to an existing note, I ended up using NoteBox, which worked well.

Today's 4.1 update to Drafts contains, among a plethora of fixes and improvements, operations for drafts, which include a Merge mode. This enables me to go back to a single note-taking app on my devices as Drafts can now handle capturing text through the extension and merging of notes.