Not in my Overcast feed yet.
Is it already posted?
It should be appearing soon. I’ve just been chatting to @RosemaryOrchard about it being in the RSS, but not yet appearing in some of the other service feeds.
Thank you for informing her.
I just received the notification from Overcast for this new episode.
I had a couple of ideas about the playing a sound in a Drafts action point that came up.
And no IBM don’t provide a workaround in their document, only confirmation that there isn’t one.
But if you have a Mac, you can certainly try it out, and see if you can identify what the mystery sound it plays is
Audio (Shell Script)
But, if you’re on a Mac anyway, I think a nicer approach, assuming you have the audio file stored locally, is to use Drafts to run some shell script to play the audio.
- Download Drafts Audio (Shell) action.
This action is just playing a standard Mac system audio file from the command line and it’s actually really easy to do.
In both cases the actual audio to be played is specified by the template tag step at the start of the action, so if anyone does want to use it, it is relatively easy to maintain (but that first option uses a Base64 encoded version of an MP3 file - you can encode files on the command line on the Mac (see the “Base64 Encoding Images: Mac” section in this Drafts-related post) or via an online service, of which there are many).
To use these actions, you can include the action at the end of any other action to play a sound on completion.
Note: I’ve purposefully left the options for both actions as visible on Mac and iPhone/iPad just so people can take a look at the steps an code regardless of what platforms they have access to.
@MacSparky level 100 fanboyed in this one! lol
There was a mention of automatically turning off the sleep mode on the iPhone while shopping. How was this achieved?
app.isIdleDisabled = true;
Thanks. Can this be used in Scriptable or only in Drafts?
This is an attribute specifically on the “app” global in Drafts so I’m thinking it’s just drafts.
You are correct. It is a Drafts specific feature. App developers would need to build an equivalent into their apps for it to be available in those apps.
The shopping mode action is linked in the show notes
Thanks. That would be a good Shortcut action to have. Disable and Enable Auto-Luck when a certain app is open.
I’m pretty sure you have to have Drafts active for it to work.
Yes. I was just wishfull thinking that the Shortcuts had a stock action like that. It would be useful.
I hear ya. Lots of settings would be handy if we could toggle them with Shortcuts
@MacSparky , I could not be sure it is what you described in the episode but How can I add a template text infront of my draft text?
With using insert text action it only add where the cursor is.
Simply, writing a note and with taping an action to add a title and date infront of it and a checklist in the end if my note?
@nenver, there are lots of ways to create actions to do this. Here’s one example I put together for you:
The action has 4 steps.
This step prompts you to enter a title for the draft to add at the top. If you always want the same title, you would just put it into step two and delete this step.
2. Define ‘start’ tag
Drafts has a few things it refers to as “tags”. This action step is referring to a template tag and can be thought of as a variable, a place to hold some content we can use later.
You edit this like a mini draft and can use text, Markdown, template tags, etc.
I’ve set it up to put whatever was entered in the first action step (the prompt) as a level 1 Markdown heading. This is followed on the next line with a Markdown bolded “Date:” label, followed by the date - you can apply further formatting to the date by modifying the tag.
It then adds a blank line at the end.
# [[thetitle_text]] **Date:** [[date]]
You can modify this to whatever you want to appear at the start of the draft it is run against.
3. Define ‘end’ tag
The ‘end’ tag is the same sort of thing but for the end.
As an example, I added a horizontal rule, followed by some example checkboxes.
--- - [ ] Checklist Item 1 - [ ] Checklist Item 2 - [ ] Checklist Item 3
4. Update draft content
draft.content = draft.processTemplate(`[[start]] [[draft]] [[end]]`); draft.update();
Should you, or anyone else want to try something a little different.
If you wanted to get more advanced and do things like maintaining the cursor position/selection, then perhaps check out the
editor.TA_append()functions in the ThoughtAsylum Drafts Library, which you can get by installing and setting up the ThoughtAsylum action group; as the first step of your action, include action
TADas the first action step, and this will load the library and give you access to those functions in a script step.
Hope that helps.