Quick text capture & processing via Shortcuts (Drafts replacement)

I developed an alternative to using the Drafts app to quickly capture text and appending/prepending text files.

Why? When Drafts went to subscription, I had to take a look at how I used Drafts. The truth is, the development trajectory was heading towards an Evernote-style proprietary file system that I was trying to avoid by using Drafts. I just wanted to capture text, send it elsewhere. The very reason I bought the app in the first place.

To do this simple custom automation required the full subscription. I specifically did not want my notes collected in Drafts, which is where Drafts was headed. And exporting my Drafts was less than ideal, as they export into one long document. Had to get out of that silo.

The solution uses the 1Writer app to capture the text, and a 1Writer action to send it to Shortcuts. The Shortcut is set up to return the user to 1Writer once the text is processed, and I have a second 1Writer action to delete the text to clear it for the next capture. If I knew how to automate the text-clearing step, I would.

I have found this system to be better than how I used to do this in Drafts because I am forced to file the captured text immediately. Too often in Drafts I just ā€œinboxedā€ everything.

Here is the JavaScript for the 1Writer action, which is set up as a custom key on the custom keyboard row:

var text = editor.getSelectedText();

if(text==""){
  text=editor.getText();
}

app.openURL('shortcuts://run-shortcut?name=Sort&input=' + encodeURIComponent(text));

This sends the text to a Shortcut named ā€œSortā€, which of course should be edited to suit your setup.

Once sent to The ā€œSortā€ Shortcut, that Shortcut allows me to choose from a set of different text append/prepend Shortcuts. So ā€Sortā€ is just a menu that runs other Shortcuts.

Each of those Shortcuts do essentially the same thing, appending or prepending a text file in Dropbox or iCloud Drive. None of them are very complex.

These all have simple action steps like ā€œGet Text From Inputā€, then saved to a variable, then combine in a Text action to add a delimiter below the entry, then using Append To File to add to the text file on your desired cloud service.

Because much of this is used for daily logging, I implement a dynamic date stamp system for the titles of the files to be appended. This allows me to keep a daily log/journal and have the title be the current date, and be dynamically created.

My date stamp goes so far as to ensure post-midnight but pre-6am entries are made on the previous day (I am a night owl). Something I was unable to figure out in Drafts. But easily achieved in Shortcuts. I can share details if there is any interest.

The main key to all of this was being able to send text to Shortcuts. Other text editor apps besides 1Writer may have this capability.

I have a dedicated ā€œcapture.txtā€ file in my 1Writer/nvALT folder that I use for capturing the text, and this file can be invoked by a Siri Shortcut, so you could even set up a home screen shortcut to pull up this exact capture.txt file for quick access.

Of course, you could just use the basic text capture window implemented natively by Shortcuts, but I find that tiny window excruciating to type into. With the 1Writer approach, I get a nice big canvas to work on, and access to all the text manipulation tools as I write.

As mentioned, I like this system better because it forces me to file the text snippet immediately.

I really do not miss Drafts at all, because most of the text editor automation/manipulation stuff I can do in 1Writer. And I now have the entire Shortcuts repertoire to work with when processing my text, so I feel like I have even more available to me by doing things this way.

Bravo!

I have something similar with a Ask for Input action in Shortcuts.

I also donā€™t use Drafts because of subscription :wink:

Just to clarify that point. For others reading this, do note that Drafts is a free app. It has a freemium model (just like Evernote, Bear, etc.) whereby the subscription unlocks additional ā€œproā€ features.

To do this simple custom automation required the full subscription

@george_cā€™s requirement was focused around the ā€˜custom automationā€™ aspect and the subscription being a barrier to that particular functionality.

Drafts offers a lot of automations that you can download and make use of from its Action Directory as a ā€˜freeā€™ user, but to modify most actions you need to go pro. However, even there, there are now some action customisation pages appearing that allow you to tailor simple actions using a web-page-based action wizards, and if people genuinely find them useful, more will end up being created - the receptionā€™s been pretty positive so far.

I was not aware that you could add (non-modifiable) user-crated Actions from the Action Directory as a free user.

But yes as I mentioned, to do any customization requires the Pro subscription, and Iā€™ve no interest in all the file management features Drafts has been focusing on.

This system I built using Shortcuts does everything I ever used Drafts for (and more), and is easier to built Actions for. Iā€™m sure if one uses the advanced features and document management in Drafts, itā€™s worth it. People seem to really like it. But aside from playing around with them to see how they worked, I never found myself actually using any of the advanced features back when I had access to them when the app was a one-off purchase (which I always upgraded, and regularly used the ā€œtip jarā€).

I have no ill-will towards Drafts or the developer, heā€™s always been super nice and helpful when I emailed with questions.

But I think there are many like myself who just wanted a simple text capture & process tool.

Yep I started with the ā€œAsk For Inputā€ approach, but that tiny text field and miniature text wasnā€™t cutting it for me. Hence the 1Writer & Action addition, which is really the key to making this work for me.

Yes, but the thing is, if an app is subscription then it should be well maintained. Drafts is buggy and the sync is constantly breaking. Iā€™m not going to support an app that charges a subscription for bugs.

Iā€™m not sure that is how everyone finds it.

Speaking for myself, Iā€™ve been using Drafts almost daily since v2. Iā€™ve not had any sync issues to date, though I know they can occur, so perhaps I should count myself fortunate?

As for bugs, I have found quite a number, but I also use the beta versions of the app so Iā€™m not really surprised in that. I would note that in each case they were resolved in the next beta iteration when Iā€™ve reported them. Overall I wouldnā€™t say the bugs I have identified have been all that obvious. Often they have been edge cases or under used functionality that Iā€™ve been exploring. Iā€™ve certainly come across software that I would describe as buggy, but in my own experience, I would not in good conscience be able to describe it as buggy.

Did you ever report any of your issues to the developer?

2 Likes
  1. I would consider missing the entire actions directory on my iPhone to be a serious and obvious bug.
  2. No, I didnā€™t bother contacting the developer. I just deleted the app.T he fact that a subscription is being charged means that either the developer(s) care about the app and want to make a living, or that the app is a money grab. The bugs and sync issues show (to me at least) that it is the second option.

Drafts has the potential to be a really great app. But with subscription, bugs, sync issues, and the ability to create Shortcuts with most of its features, itā€™s just not good enough for me.

of course, people will think differently. I speak for myself and myself alone.