68: Stephen Millard and ThoughtAsylum

3 Likes

Great episode! I immediately downloaded the IM-Icon Generator shortcut and put it to work. I modified it a bit to use notifications as status and progress updates, so I could know how far through the process it is. If anyone’s interested, here’s that modified version (hope that’s okay to post here Stephen!)

https://www.icloud.com/shortcuts/aecc272d2d5246efbe47b60c60f77388

1 Like

Of course not :slightly_smiling_face: I’m simply glad people are finding it useful.

For what it’s worth, I originally had some notifications in the shortcut to give an indication of progress. But it slowed things down and I didn’t get all that much benefit from knowing how far through processing it was or how much processing had been done (I gave it a try with percentage and a volmsof every 200). I couldn’t do anything with the information, it was just peace of mind I guess.

I ended up removing them as on my admittedly older devices(iPhone 8+ and an old 9.4" iPad Pro), speed was very much the critical factor to address the time outs I got. It’s always a batch processing job and you need to give them a time window to run in. As a result I set them running and come back later.

1 Like

After hearing the episode I reread the thread old thread discussing an issue with you and realized I came off as a total jerk so apologies for that. You seem like a really nice guy and thanks for a great episode.

Yep, I figured you had considered all of this very carefully. I always struggle to find the balance of performance vs. verbosity. It’s disappointing that doing a tiny amount of math slows down a Shortcut so much.

Inspired by @sylumer’s episode, after downloading ThoughtAsylum, I still could not find a simple action to strip any line numbering from the active draft, so I decided to write my own. For the first time, without starting from someone else’s action, I wrote and then fixed about 10 errors to give me:

let theDraft = draft.content;
let lines = theDraft.split('\n');
let linesNum = lines.length;


for (let ix=0; ix < linesNum; ix++) {
lines[ix] = lines[ix].replace(/^\s*\d+\.\s+/,"");
 }

newContent = lines.join("\n");

draft.content = newContent;
draft.update();

I only share it here because it was the first time I was able to write a javascript action by myself, taking a million things I’ve learned here over the years and put them to good use. Very satisfying! Thanks, @sylumer!

2 Likes