It is now easier than ever to add a specific shortcut to run in Drafts. A new interface is presented when adding a shortcut, as you can see by installing this example shortcut and selecting a shortcut to add. It prompts you for a few different items for running the shortcut, and is a better way of implementing them via the URL scheme. I feel that this method is a bit more user-friendly now that a shortcut has been written to quickly add them, and requires no formal coding knowledge.
Workspaces have been available since version 5.0 dropped back in April 2018. It is the single biggest improvement to Drafts, providing users with an infinite number of filtered views of the draft list. Extending it further, you can apply action groups and extended keyboards to a workspace and have what I coined as a module. In Drafts 5.2, the script and capability of automatically making this possible was implemented. In this new version, it is now more accessible to the non-scripting user.
Post and File Management Improvements
Drafts uses CloudKit to sync data to the cloud. There are more aspects of the drafts which are stored there, like location, tags, etc. which don’t tie in nicely to syncing to an iCloud Drive folder. You can, however, use different actions to save specific drafts to other services like iCloud Drive, Dropbox, Box, or OneDrive. Previously in Drafts, the idea of keeping things in the app was not always something you would want to do: you might want to save it to Apple Notes via a share action, or send it to one of a handful of other services as a plain text file or Markdown file.
For the most part, I keep all of my writing in Drafts. Over the past year, I have more in that module than I would like to admit. And I feel some stress of keeping all of these posts in the draft list. With the new features, I have several different ways of handling this. First, I could simply mark the drafts which I’m actively working on and load the writing module to the flagged tab; this is easy enough to do in the workspace settings, and would quickly satisfy the need. But the file management capabilities are something else that I wanted to explore.
What I ended up arriving at was this: I can keep one or two active drafts in the list, and save the rest to a specific folder in iCloud Drive. Once I’m ready to work on another one, I can run an action and be presented with a list of titles to choose from; the action would then load the contents of the draft into my draft list with a specific tag, and I can start writing on it again. This is all possible thanks to the
FileManager script object methods.
I first borrowed from some of my previous scripts to ensure that I was saving things with the correct title. For the save action, I used a file action step, set the folder location to
/Draft Posts/ and set the content as
[[draft]]. Once this action is run, the draft is deleted from my draft list.
writing tag which automatically places it into my Writing module, and I can start writing; I also use an "Include Action" step to load my Writing module to bring up everything I need with one tap.
The last action is needed for when I publish a post. I modified my existing standard and linked publishing actions – which I first introduced on MacStories for Drafts 5.4 – to save the file one last time to the
/Post Drafts/ folder location, then move it to the
/Posts/ folder where I keep my final posts as
.md files. This happens at the end of the action after everything is posted.
One of the limitations of using the file management methods is that you cannot specify a folder outside of the Drafts folder.1 For some, this might be something that is a limitation. But because I work so much in Drafts, this isn’t an issue for me. Additionally, I can point other apps to that specified folder location – like Working Copy – to then upload files as I need for collaboration. Rather than keep all of these possible post ideas within my draft list and cause me more stress. And if you’re reading this, you know already how much I hate clutter…
I have also updated the HTML Preview step in my Post to WordPress actions above to include the new rendering options. With this update, Drafts allows the user to specify the rendering of text. Previously, only Markdown was supported in this fashion. But now, you can specify MultiMarkdown or Github–flavored Markdown, saving a bunch of script steps in the process. I updated WordPress actions with
%%multimarkdown|text%% for the HTML preview, as well as improved the scripting to commit the Critic Markup changes to pass MultiMarkdown to WordPress, which you can find at the links above. And speaking of Critic Markup, a new highlight syntax color has been added. It provides a bit more visual difference when looking at all of your credit markup notations.
I’m really enjoying these updates. Even small point releases like this one are enhancing my custom writing tool, and I look forward to other ways it can be improved for the future.
- This is something that I hope improves with time by Apple allowing access to other parts of the system. ↩