Automators 54: Scripting Time with Dr Drang

3 Likes

Great episode, especially the section about how to start. However, I have an even more basic problem: I cannot come up with ideas. I don‘t know the tools well enough to have a good understanding of what they can do which leads to not seeing the possibility of solving a problem with a script or a shortcut. And by not seeing opportunities I am not motivated to learn the tools. It is really a chicken-and-egg problem… can anybody relate? :sweat_smile:

2 Likes

I’m still listening to this episode, but regarding the iOS 14 dev b2 shortcut breakage, it’s in the public beta too (same builds).

Basically for the shortcuts I could not live without, I have a folder for iOS 14b2 versions. I then made my own combine shortcut to which I pass a list, which looks for the separator as item 1, and a list of items to combine as item 2.

For split, I’ve found that a simple regex will do the trick. To split on \n (for example) just use a capture like ([^\n]+) and you’ll get a list in capture group 1 of everything you want as though you did a split on \n.

Another text function that’s broken is Change Case, but the iOS app Text Case works within shortcuts and can do all the text case formatting instead of the built-in broken action.

Anyway, for people waiting for a fix, it’s probably better to just use these workarounds. There’s a javascript based shortcut floating around that rewrites your shortcuts to use local javascript execution, but it’s buggy and doesn’t correctly convert complex shortcuts. You’ll have to roll your own, but it’s easy using the above workarounds.

As I was listening to the episode, I laughed at Dewey, Cheatem, and Howe, but I thought to myself, “Well, Doctor, David probably knows Johnny Carson, but I’m guessing Rose may never have even heard of him.”

(I’m also disappointed that the Wikipedia article buries Carson fairly far down the list, but chronologically, he was long before many of the others. Hashtag kids these days get off my lawn.)

2 Likes

Assume an almost one-way chain of cultural reference understanding…

USAn -> Brit -> Netherlands / Belgium / Nordics.

(And I’ve kept it simple - before anybody complains of being left out.) :slight_smile:

Loved this episode. I was actually just browsing through Dr. Drang’s automations for tagging.

Several automations today pertained to creating a hierarchy of folders via scripts or apps or .zip file templates.

One that I haven’t seen mentioned is Cookie Cutter, which is arguably the most versatile way to do this. Highly recommended!!!

I think @RosemaryOrchard will definitely like this.

I feel your pain. The one that I really got into just recently was a reading list. I am always getting suggestions of a book to read and I want to capture that information quick, but I always do it in random places and in random formats. So I created a shortcut that asks for the “Title,” “Author,” and “Any Notes” (who recommended, why, etc.). Then that saves it to a Todoist task and creates an Evernote note. It wasn’t necessarily about making it quicker, but about doing it consistently after recognizing I organized things the same way (or at least I wanted to).

The other suggestion I always see is try to create something you already know, like a faux twitter client or a task manager, but that’s like real programming and not automation lol.

1 Like

I don’t remember Carson using Dewey, Cheatham & Howe, only that his personal lawyer was Bombastic Bushkin. My other go to law firm name is Flywheel, Shyster & Flywheel.

2 Likes

In this episode, Rosemary mentioned a ‘Date Math’ method in the Javascript implementation within Drafts. I’ve had a look at the documentation and couldn’t find it. Is that a beta feature?

Oh - and I am very much a +1 on using Python for automation. It’s great! I took the idea of creating folders with Python to automate the creation of a bunch of date-oriented folders for my son’s homeschooling.

…and finally I can also recommend http://automatetheboringstuff.com for some great ideas and tips.

Not a beta feature; in fact there are no active Drafts betas right now. The library that is included in Drafts is datejs.

2 Likes

Thanks, @sylumer - managed to track it down and get it working. Nice!

I really appreciated @drdrang pointing out that Shortcuts, etc is programming. Even though I am a professional developer, I’ve always hated that snobby gatekeeping that says X (Shortcuts, Scratch, Applescript, VB, etc) “isn’t real programming”.

1 Like

For some reason, I never got the double entendre on this until after reading the linked Wikipedia page.

Dewey, Cheatem and Howe --> Do We Cheat 'em, and how!

:man_facepalming:t3: :joy:

//Shawn

1 Like

I thought the episode with Dr. Drang was great.

Especially the part about when he talked about folks having the right skills and not knowing it. Some of the complex shortcuts could absolutely be considered programming.

Folks have learned the syntax, added in a dose of creativity, and create items to solve real world problems.

So what if its not built using a text editor or some other IDE.

3 Likes

I recommend you to start with trying to understand automations created by other people. As you read through a description, re-write the script/Shortcut/… on you device and try to replicate the result. When you’re done, try to customize the automation. For instance: “if I change this path slightly, the resulting files will be saved to the desktop instead of the downloads folder”.

After a few tutorials, you’ll be able to do substantial customizations and probably have started thinking about things to automate in your life.

Later, when you want to build something from scratch, I suggest you start with something simple. A good example could be an egg timer in Shortcuts.app.

Happy coding! :beers:

2 Likes