When I first saw Rene's tweet, I knew he was being snarky. However, my first thought went to Shortcuts when I saw it (hence my tweet). Renaming of files on iOS is a perfect use case of Shortcuts. But rather than stop at just simply renaming a file, it's possible to submit the entry all with a couple of taps on iOS. And now that I've said that you can do it with Shortcuts, I figured I should make one if I'm going to put out the thought. So, with a little bit of work, I created the #ShotOniPhone shortcut.
When you install it, you'll be prompted to input your first and last names: these items are required for the file name if you are going to email in the submission. Once you've entered that information, you can either run this as a stand alone shortcut or as an extension from the Photos app.
The first part of the action checks to see if any images were input, and if not, prompts you to select an image; I've used this little block countless times in other shortcuts, and copied the same method here. Next, you'll be prompted for an image caption to go with the perfect #ShotOniPhone image. Then, the image will be given a new file name – which Apple requires for the email submission portion – using the dictionary items you were prompted for when first installing the shortcut and pulling the device type from the image metadata itself.[1]
Finally, there are a few options for submission: Twitter, Instagram, or email.[2] You'll select which one you would like to choose, and follow the steps from there. (For the Instagram step, it is important to note that the caption is copied to the clipboard and you will have to manually paste it in caption area of the app.) Each method passes the image in its full resolution to the application of choice; I'd recommend email as the first submission, as Twitter and Instagram will likely compress the image.
And that's it! This shortcut may seem complex, but it's really simple to run once you get it installed. Not only does it rename the photo for you, it also helps you submit your photo to the challenge. Now anyone can shoot and submit to this #ShotOniPhone Challenge, all from their iPhone. Turns Out™, you don't need a Mac to do it after all…
This was suggested by Thomas Verschoren, and I've updated the shortcut to reflect this. Thanks for the suggestion! ↩︎
Weibo is also a part of this, but I don't have the ability to add the action. So… maybe someone else can add it. ↩︎
Last week, Drafts released version 5.6. While it is not as big as some of the other releases before it, it does bring some important enhancements to the app.
Adding Shortcuts
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.
Workspace Changes
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.
Within the Workspaces menu, you can choose to load in action group or extended keyboard for each of the different workspaces you create. This does sync across devices, so for most users, this is a better way to load module with a single tap without having to know JavaScript. You can also now load a workspace to a specific tab, saving a few taps if needed. However, I personally won't be using this as my setup involves loading workspaces differently based on the device type (as I laid out in my earlier Drafts piece).
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. When I'm ready to publish, I take that final draft and move it in to my posted folder to file it away. This is all possible thanks to the FileManagerscript object methods.
I first borrowed from some of my previous scripts to ensure that I was saving things with the correct title. To save the file with that name, 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 then deleted from my draft list to keep it uncluttered.
The next action was much more difficult to create. Within the updated objects, I can pull out the path locations to files located in a specified folder. With a little script magic, I can turn those file paths into readable display names to choose from in a prompt; this will work with all of the files in the directory. Once I have the selected name, I can load that file into Drafts, tag it with my writing tag which automatically places the file into my Writing module, and I can start writing; I also used an "Include Action" step to load my Writing module to bring up my entire writing environment with one tap.
The last action is for publishing my post. I modified my existing standard and linked publishing actions – which I first introduced on MacStories for Drafts 5.4 – to save the file in a new way. First, I use the scripting to save the file one last time to the /Draft Posts/ folder location where I keep the draft posts, 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. Why do this? It allows me to take the one true copy that I finally saved in my draft posts and then move it into the final location. I don't have to keep the files in multiple places and wonder which one is correct; instead, I just moved out the finished product.
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 this update, as it's helping me reduce my mental stress by allowing me to manage my files in a better way. Rather than keep all of these possible post ideas within my draft list and cause me more stress. And if you're reading this and follow some of my other work, you know already how much I hate clutter…
For a while now, I've had the same backpack. It's been my trusted bag for everything: work, travel, day tripping, etc. It carries everything I could think about needing and then some. But with some changes in my needs, I started realizing that for some situations – like going to my 3rd office that is known as Chipotle – it's way more than I need. I need something smaller on the weekends when I'm not lugging my work laptop around.[1]
I needed something smaller, compact, focused. I needed a tactical bag.
So in my quest, I started thinking about what I would need for a trip for personal life, excluding work from it completely. I started developing a list of what I would need at any given time while on the go, and I was intentionally thinking of what I really needed for a day run anywhere I was going. I had some other needs as well: I wanted it to be as small as possible, have some RFID shielding, and also provide some anti-theft options. I did a lot of searching, and even asked Seth – the man who has a bag for damn near anything – about what he uses for this purpose. He had recently picked up the Pacsafe Vibe 325. It looked like a great bag, but it was a bit more than I wanted to spend.[2] But when I looked for that bag on Amazon, I found a few other bags that caught my eye.
After a bit of sifting, I ended up finding the Travelon Anti-Theft Urban Sling Bag. While it doesn't look tactical the way a GO RUCK bag does, this thing just screams urban tactical. Even though this is a small carry, it's large enough for me to overpack it and get a lot inside of it. I ended up getting black, even though there is a gray option I might have liked more, because it blends seamlessly with the zippers.
There are a lot of anti-theft details of this bag: there are locking zippers to keep the compartments secure as you are moving around; the bag and straps have reinforced, anti-slash materials to keep the bag from being cut off my body; and the area for cards/passports are RFID shielded. These features make it a great bag for going around town, traveling to a big city via plane, train, or bicycle. I can even put a water bottle or Yeti tumbler on either side for travel.
[![EDC (/images/5156A67A-79D3-4D22-B157-27EBD4E75F15-1024x768.jpeg "Bag 2019]")](/images/5156A67A-79D3-4D22-B157-27EBD4E75F15.jpeg) This bag holds more than I thought it would.[/caption]
With this bag, I'm able to fit most of what I carry on a normal basis. In the bag, I have:
Personal items: Passport, corporate AMEX, a Visa gift card (for emergencies only), Kleenex, Boogie Wipes, Purell, Carmen lip balm, nail clippers, and flushable wipes
That's a lot for me to carry on any given day; I don't carry all of the items all the time, but it's nice to know that I can if I want to do so. And while my goal of this bag was to be light-carry, this bag makes all of this feel minimal when I'm out and about, even when it's packed full.
I really love the way this has turned out. I wish I could use this all the time, but there are some things that I do need to carry during the weekday which force me to use my backpack. There is, however, a clear delineation with which bag I grab now. But for the times where I need to be minimal while still being dangerous, this will be my go-to tactical bag for the future.
Funny thing is that I decreased the weight of my work laptop by 4 lbs, but yet I still find carrying the thing a pain in my ass. ↩︎
This was a Secret Santa gift given to me by my cousin. It's monogrammed on the front as well. It's perfect for what I need. ↩︎
I got this at a local store. This is the best approximation of what I have. Cannot say I recommend it because I didn't buy this exact one, but it's similar. YMMV. ↩︎
After the release of Drafts 5.5, I’ve been using Critic Markup even more for the writing I’m doing.[1]("#fn:1" ""see") I hadn’t really used it before now, so leave it to Drafts to provide me some tools to improve the way in which I write.
In that post about the improvements in Drafts 5.5, I had shared updates to my actions for standard and linked posts. These have been super useful for me. But there are others out there that need to use plain Markdown for their posts. I had a follower pose this request on Twitter, and I decided it would be a small challenge to tackle and share.
Unlike my preview action for my site, I needed to keep the raw Markdown, rather than convert it to HTML. This isn’t something I can do natively using the script objects. So I needed a different way to make this all happen. I first needed to identify the Critic Markup elements:
Looking at what I needed to do, it was apparent that I needed to first remove the comment and delete elements completely, then keep the text within the add and highlight elements. The substitution element is a bit more tricky, where I need to delete the first word and keep the second word, while deleting the surround elements. With a little help of RegEx, I came up with the pattern:
The pipe characters are essentially the “or”, and the rest is to separate the elements. Combining this with elements of JavaScript and the Drafts Script Reference, I created an action to accept critic markup in a new draft, and preserve the existing draft. I did this to show the main RegEx, but it could be used in other ways: this could be a simple script to create a variable for posting; it could be used in conjunction with a step in Shortcuts; or it could even be used when saving out copies of long-form writing.
As the Drafts community and others create new actions that result in tools for writing, it helps to make Drafts more accessible and adaptable to each user. Writing in it may not be for everyone, but you should try it out to be sure. You might be delighted with what you find.
Yes, it‘s been a while. Yes, I’ve been working on things here and there. More to come later. [ ↩]("#fnref:1" ""return")
The latest Drafts update brings some improvements with Markdown syntax. In addition to the standard Markdown (which has been simplified to represent the original Markdown specification), there are two additional syntax options: MultiMarkdown and GitHub Markdown. MultiMarkdown is a flavor which allows for footnotes, tables, citations, etc. GitHub Markdown is a different flavor of Markdown which supports extensions created by GitHub for rendering on their website, and includes the extensions for strike-through text and tables. I personally use MultiMarkdown, the format with which I’ve been most comfortable writing.
One thing that is included with MultiMarkdown as an option is Critic Markup. Looking through the guide, there are several helpful elements that can be used for editing my writing utilizing Critic Markup. I can highlight some substitutions, additions, and deletions. I can highlight text to show something I might want to work on later. I can also add a basic comment somewhere that won’t be shown in a preview. And with this action, I can easily add any of them with a tap and a text entry, which inserts it in the proper format. This is helpful for creating and previewing the documents in Drafts, and gives users the flexibility to mark up files and save them back to a cloud service. I can see myself using this a lot for longer posts or large reviews. I’ve even modified my own site preview action to render the MultiMarkdown via scripting, as well as updating both my standard and linked post WordPress publishing actions to do the same.
There are additional Workspace options for sorting. You can now include flagged drafts in the archive tab – the same way it is done today with the inbox – as well as optionally sort the flagged drafts at the top. And of course, support for using these is also added to the script object. This allows you to give a bit of priority to Drafts in your inbox, depending on how you have your workspace configured. I liken it to something like Gmail: there’s a giant inbox of drafts, and you have a starred list that can be used to filter priority; you can also option to have the starred emails on top to bring them into focus, or have them in their separate list. This smart addition enables more focus on key drafts in your list.
There are some other small improvements and fixes; you can read the full list here. It may seem like a small update to some, but for the advanced users of Markdown, this is a fantastic update. What this should give users a glimpse of for the future of Drafts: custom syntax highlighting. Currently, the following syntaxes are supported: Markdown, MultiMarkdown, GitHub Markdown, JavaScript, and TaskPaper. Whereas I love the new Critic Markup portion of MultiMarkdown, I would love to be able to customize my own syntax. When I used Ulysses for writing, I really liked some of the comment, highlight, delete, and other markup styles. Part of what makes Drafts so versatile to each user is the myriad of ways which it can be customized. Controlling the editor in this fashion would, to me, make the editor the most powerful on iOS. No other editor would allow for syntax highlighting for writing and coding in the same way. I know this will at some point be on the horizon, but that cannot come soon enough. I’ll patiently wait for it after the Drafts for Mac release.