Skip to main content
View on YouTube to comment and like!

over 2 years ago Syntax Podcast

Little Scripts: Coding for your Co-workers

Wes Bos

Wes Bos Host

Scott Tolinski

Scott Tolinski Host

Topic 0 18:42

Recommend browser app over desktop app for user-friendliness

Wes Bos

so you can simply just right click

Wes Bos

little scripts to automate things, maybe even give me some, like I Wes like, give me some interesting points. Give me some funny points.

Wes Bos

and check it out. I don't think they have this. I really wish and then publishes it. And and once it's public, do that JS well as one thing we're working on is also just scaffold out all the chapters into the markdown file because he has to write the show notes as Wes.

Scott Tolinski

a app using Tori relatively easy,

Scott Tolinski

you know, would be helpful to the to user that is going to be using it.

Scott Tolinski

Yeah. Yeah. I agree. You know what? One one cool thing too here that we we you kind of briefly touched on. But, you know, you could take that website that you were talking about and turn it into

Wes Bos

some sort of convert it in the browser and then allow you to click it and download it.

Scott Tolinski

this, and then you can pass in the stuff that you wanna run. There you go. You now have a GUI for your script that you're running if that is something that, But what are some ways that you've run some of these scripts? One of one of the ways that I I've written scripts is I took it as an opportunity to learn Rust a little bit. I hacked together JavaScript in Rust, and then I was able to output it as a straight up executable. Anybody can run an executable. Right?

Wes Bos

Another one from John Linkwitz TypeScript kit.

Wes Bos

convert,

Scott Tolinski

because with a Katori app, you could use now you can do, like, a quick Svelte interface or a quick interface in in, you know, whatever you're using. And then all you're essentially doing is invoking a script and the Tore side. And that that side of things is as simple as saying, invoke If I saw stuff, I would bookmark it and then lose it. So what I did is I wrote a Raycast extension that'll let just took whatever JS ever in my clipboard and put it onto the list, and then Caitlyn would have that for whenever she was publishing the newsletter.

Wes Bos

And for somebody who writes, like, a lot of But, certainly, there's lots of people in your organization that might need a little help with that type of thing.

Wes Bos

because that would honestly, that's the the ideal he's got lots of of processes. Right? And

Topic 1 06:35

Using AI like ChatGPT to help with complex tasks like FFmpeg

Scott Tolinski

the script was failing. And I was like, oh, I I messed up part of the script. No. The script was finding the broken link just fine. It worked. Yeah. It worked. I was like, okay. Why is this link broken? It shouldn't be broken. It exists. No. The link was actually broken. And so,

Scott Tolinski

it was it was set to, like, you know, make public on public. It wasn't publicly available. Yeah. It was set to private. Therefore,

Scott Tolinski

And oftentimes,

Scott Tolinski

essentially take it in a file input and verify that,

Scott Tolinski

you can use these types of things to to do any of your tasks, any of your bidding. Right?

Scott Tolinski

markdown is definitely a developer's

Scott Tolinski

Let's talk about some other cool stuff. So one one thing that, you know, we really needed to do was to make sure that our shows,

Scott Tolinski

and that's not always a great thing. But Yeah. Welcome to the developer podcast where we make you author the show notes Yarn it as solved, and move on. So if you wanna check out Century, head on over to century.ioforward/

Scott Tolinski

You have I, being myself, would frequently forget

Scott Tolinski

to check a number of things with the markdown. But to be able to

Scott Tolinski

tool. Right? just because you have the superpower a very specific format or very specific thing you have anybody in your life needing to edit or work in. You can write code to validate that.

Scott Tolinski

which are authored in markdown,

Topic 2 16:17

Challenges giving scripts to non-developers

Wes Bos

and Wasm because FFmpeg has a Wasm that runs in the browser,

Wes Bos

and I could simply just Yeah. And it kicked out the chapters in, like, 2 seconds, and I was like, oh, damn. Like,

Wes Bos

I could never never get it to work properly. I never understand what to do, and it you're half in this, like, weird

Wes Bos

The script itself was in Node, find it out. Like, Google search does that. If you search and the answer is in a video, it will try to link you to where in that video

Wes Bos

applications.

Wes Bos

context menu on Bos, like, basically, we wanna right click, the editor edits the thing. The editor writes our own show notes, One one kinda interesting idea I'm gonna I'm just gonna pitch it this to you, Scott. And That's it. It it's also probably worth talking to Randy about to see if this would be handy as well is

Wes Bos

giving it to that instead of having to open it, it kinda has, like, a Raycast interface, but I really wish that it would And the way that chapter markers work in,

Wes Bos

That's the beauty of of the browser JS that you can make contained shippable It was stripping the the markers. There's no way to export a m p 3 and talk about how do you actually write these things and hand them off to people who who need to do them? Yeah. And, you know, they can even help you out. They could be a good introduction of things that you can do, And then just from all of that data, I was able to say, okay. Well, I'm I've listened to the podcast because I was on it, and I have a good idea of where in the episode these things were talked about.

Wes Bos

so many AppleScripts in my day, and I always the show title was in front matter and, like, this is a super handy tool. Go to scriptkit.com

Wes Bos

if I give you these 11 things, and then, like, they're not actually gonna use that because it's it's too complicated. It doesn't actually fit fit into their workflow.

Wes Bos

GUI with things that are connected to each other, and I'd rather just have a a node script and have everything up and running.

Wes Bos

always am so frustrated. There's a there's a whole JavaScript API for writing AppleScript, and little commands to run it. Like, he's like, oh, like, let me try yeah. A little simple one, but then you wanna get into concurrency or you wanna loop over some files. And then before you know it, you're just like,

Wes Bos

Mhmm. Yeah. There's type of thing to be able to do it. Because whenever you're getting into Node TypeScript, then you Scott, like sometimes you gotta kick out to a different script or you gotta, like, how do you pass a file into Node. Js from a GUI? You gotta tell them to, like, CD into a directory. So

Wes Bos

Homebrew, and then Homebrew install FFmpeg, and then install Node JS, and then there was some permissions issues, which I had never hit before, and then he needed Node, that was really handy. So we just put together a little script that would

Wes Bos

Oh, no. It was an Apple script which triggered a bash, which ran a Node JS script. So I had to get Randy to, like, install and it will go off on a trial process, run that, and then come back with the actual, and he is doing all the producing Scott asked me to pull a whole bunch of clips out the other day.

Wes Bos

in order to run. You know? Like, it's just like,

Wes Bos

with Randy, I wrote a,

Topic 3 00:36

Randy hitting issues exporting videos; writing scripts to help

Wes Bos

and exporting of the video and and editing it all together and

Scott Tolinski

speed up your your workflow so you can spend time doing, you know, things you wanna be doing instead of the mundane tasks of your life.

Wes Bos

like, even as, like, a video editor, no matter how good you are at your tools,

Scott Tolinski

Potentially, it's a cool use to get to practice your programming skills while accomplishing tasks you need to do for work

Scott Tolinski

to getting into programming in a more practical way if you're the type of person who's just trying to break in. Maybe you're working, and as long as track, make sure it doesn't happen again.

Wes Bos

that flow. So I thought we would just kinda talk about a couple examples

Scott Tolinski

a job right now that isn't a programming job.

Scott Tolinski

to potentially dive into some of this stuff as a, you know, a life hack to both gain experience, but also

Wes Bos

either the speed at which you do things or the accuracy at which you do things when you can TypeScript

Wes Bos

to Scott help him out, and I thought, like, this is kind of an interesting show because, recording softwares what have I done? I wish I just had done this in,

Topic 4 02:12

Sentry tracks down bugs in sites

Scott Tolinski

I have to solve quite a bit of bugs in my life because I create quite a bit of bugs, and, I like to solve them using a tool called Sentry. This podcast is presented by Sentry. And you know what? Sentry does such a good job of finding any kind of little

Scott Tolinski

And that's pretty neat. Right? You can attach errors directly to a GitHub issue, track it there, assign it to other people,

Scott Tolinski

syntax, using writing my own Yeah. Cool avenue to explore. Right?

Scott Tolinski

And recently, I've been noticing, Wes, the issues on Century that have existed for a long time just kinda show up in GitHub.

Scott Tolinski

and you'll get 2 months for free.

Scott Tolinski

little issue you might have in the site. It presents it in a way that you can find it, fix it, know what's going on, and then,

Topic 5 03:04

Script to export video chapters to MP3 chapters

Wes Bos

Mhmm. And if you ever just type f f probe and and give it a, Oh, it's true. Yeah. You could you could do quite a bit with that.

Wes Bos

let me see what we can Node. And I just FFmpeg.

Wes Bos

So he does that with with video, but then when we converted it, we export as a m p 3 from Resolve.

Wes Bos

into the video and and exports that JS, MP 4.

Wes Bos

I was just like, alright. Well, improve

Wes Bos

And just like that kind of stuff. Like, even if it takes them 15 minutes, like, that's 15 minutes that you can spend on doing something else. So out the other end at the end of the day. So I was just I just do f f pro, and it dumps all the info. He's like, man, like, amazing that you can just you could just do this this kind of stuff, which is really cool.

Wes Bos

of, like, who's actually giving us the best quality video

Wes Bos

the actual file. If you there's a really handy tool called f f probe. It's part of FFmpeg.

Wes Bos

a file, it will tell you all the information about that specific video file. And, in fact, when when Randy came over here, we were testing out, I think, about 5 different dollar sign back text and then write the bash script right inside of there, like CP or NPM install, to see, like, what what are the bit rates, what are the frame rates, like, all of that information first, get the transcript because it can be easier to edit video if you can cut it at a specific word, like or you can search for where oh, where did he talk about x, y, and z? No problem. I use another one on the syntax website

Wes Bos

The knuckles.

Topic 6 20:19

Invite listeners to share scripts they've written

Scott Tolinski

it doesn't sound right, does it? That's the one thing. Yeah. Yeah. I like them. I like my I like the metric stuff.

Wes Bos

architect it.

Scott Tolinski

z x for Americans out here who know the letter z.

Scott Tolinski

to do exactly this kind of stuff. And if you're the type of person who's curious and you got these types of skills,

Scott Tolinski

what a better use case for getting to flex some of those muscles than, you know, getting to use those superpowers of automating away with your newfound abilities to code stuff up. So this is sick. Yeah. Let us know what kind of things you are automating. Leave a comment if you're watching on YouTube. Hit us up on Twitter or any of the socials. We want to hear what kind of cool stuff. And if it's open source, link us to that repo. We'd love to check it out.

Wes Bos

and I use why don't we do

Wes Bos

automating things away, making things much easier.

Wes Bos

I'll,

Scott Tolinski

I don't know if I like the Celsius stuff. I guess I could get behind it, but the the Zed stuff can't get behind that. No. No. That's No.

Wes Bos

you write it in Node. Js or you write it in JavaScript, but you can run shell commands.

Scott Tolinski

And for those of you non non Canadians out there, when Wes says zed x, he doesn't mean zed x. It's

Wes Bos

It's it's fun just to build it. Even if I'm not save saving time, I'll still build a little script to to automate it because it's fun for me to

Wes Bos

I think I think that's it. Like, running the scripts, those are there's probably lots of other ways. Bash scripts is one. I always regret

Wes Bos

last week from the Deno folks, Yeah. I'd I'm very proud of Scott of Canadian stuff, but the whole Zed thing, With his DaVinci Resolve is that it just embeds them into Wes we gave it to Randy, and they'll say, hey. You gotta learn from specific time stamps. And I was like, well, if we did, like, a first pass of get the transcript and then get the every single show, we have to figure out what are good clips

Wes Bos

in Node. Js. And there's even a a whole bunch of different files. There's one called DAX that got released in the past, we've said, don't give your clients markdown. You know? Yeah. Like, my blogs are markdown, but I don't think I would ever hand off markdown to to an actual client. And,

Wes Bos

I'll fold on that one.

Wes Bos

writing Bash scripts because immediately put those into resolve. And, obviously, like, he's a human. He can take it a little bit further,

Wes Bos

to do that as well. Let me find the name of it. It's because I I we have to move files from 1 folder to another before we deploy because of some Vercel limitation, integrate with

Scott Tolinski

I mean, programming is here I can't imagine that writing the show notes is the most fun

Topic 7 09:59

AI can generate initial show notes to help editor

Wes Bos

the major It breaks halfway through. You know? Mhmm. So

Wes Bos

or you can I think it's like an ETL file? You can import markers bullet points,

Scott Tolinski

That frees him up to do so many more important tasks that you Node, he's got enough stuff to do. And,

Wes Bos

an API which you can programmatically

Wes Bos

And second, But that's it. Let us know what your scripts are that you've written for your coworkers and whatnot, because I love doing this type of stuff. There's Yeah. Anytime you have a process and the AI show notes after it's all edited, but I think if we also do it on the raw

Wes Bos

and and you kinda get a good idea of of what's going on. And I was like, perfect example. It didn't actually work that well because it I don't know why, but we needed FFmpeg.

Scott Tolinski

a more in-depth technical process. Randy's gotta sit down. He's gotta, you Node, he says he listens to the episodes

Wes Bos

of all of the bullet points from that Node. And it was, like, the perfect like, you don't even have to listen to the episode. You just read that list of bullet points, and then he puts the chapter markers OS X finder And, like, sometimes now, I'm I'm frustrated where you're you're on a YouTube video, and there's not chapters in it. And I got you think, like, come on, YouTube. Like, but in order to get the from that specific episode. And there's lots of AI clip generation things, or you can you can give it a transcript and say, hey. Give me give me points, and they're not all that good. But with embedded chapters, which JS, of course, all the podcast apps need that to to give a audio chapter. So So I think that that might have been a a better idea.

Wes Bos

if those are so good, So that had to be triggered in bash.

Wes Bos

when would you use Axios over summary standard error, standard

Scott Tolinski

taking something that is But let's talk about mundane tasks like solving bugs.

Scott Tolinski

of the tasks and jobs that we're we're tasking him with. Right? So if we could scaffold them out, to put in, you know, tasty clicks or whatever we had for the level up tutorials version of the the the newsletter.

Scott Tolinski

tons of times. So he's gotta take one of those at least one of those listens to to put together,

Wes Bos

and and, like, ideally, at the end of the day, we would just have, like, the AI show notes and

Wes Bos

embed markers some of those parts Yarn, like, he hit little issues or things can be sped up in a certain way. So we've been writing little scripts here and there,

Wes Bos

in like, do a 1st run of the show Node? Show notes. Yeah.

Wes Bos

DaVinci Resolve has a

Wes Bos

the human written show notes will be some sort of we have a editor now, Randy, and we get a whole bunch of AI show notes for it. Meaning that we ask it to summarize I think, like, I I think we still have to do the transcript Alright. Peace.

Scott Tolinski

to embed it. Wouldn't that be cool? I don't know. What do you think? Yeah. And that Node other thing, I I think it fits this conversation very well is it's

Scott Tolinski

like, final usable show notes. Like, what if you could get a head start on that or a really good foundation?

Wes Bos

And they're they're really good. Like, Matt Pocock on Twitter was asking about on the podcast And, like, there's there's so many things that could could potentially go wrong when you're writing markdown, so it's nice to have all those validation steps in place now.

Wes Bos

just built in fetch? bundle it up into some easy way. Otherwise, if it's like like, we all know the, like, the overbearing technical person who's like, oh, why are you doing it that way? I could make it so much easier and, and writing all the show notes and stuff. And, zed x. So zed x is another one from Google, and it's it's because you can just say

Topic 8 00:00

Transcript

Scott Tolinski

our coding powers for

Scott Tolinski

fun. In our own little scripts,

Scott Tolinski

Welcome to Syntax. In this

Scott Tolinski

the types of things that you can take your abilities

Scott Tolinski

Monday, hasty treat, we're gonna be talking about

Scott Tolinski

of writing code. My name is Scott Tolinski. I'm a developer from Denver, and with me JS always is Wes. Bob. Hey. Yeah. So we were

Scott Tolinski

coding for your coworkers,

Scott Tolinski

to simplify other people's lives or processes or whatever

Topic 9 08:04

Scripts can add validation to processes requiring strict steps

Wes Bos

the major talking points.

Wes Bos

we run that. We get a whole we get a transcript for it,

Wes Bos

so many of these little things that, like, you shouldn't have to rely on a human

Wes Bos

our process right now for the transcript which is dash somewhere or, like, on the old website, we put in couldn't put colons into the the show titles because

Wes Bos

that like, many times in the past, we've we've not broken the site, but, like, we have a broken build because there's a a missing

Wes Bos

and the AI show notes and and change it and rename things. But, like, wouldn't that be, like, a a little bit of a head start to get a little bit more context for for the video, and and process improvements into both video and in audio. So the process is that Randy edits the whole video podcast,

Wes Bos

is he ended up we ended up just using straight FFmpeg. I showed him how to do it, but, like, I was thinking, like, man, it might have been faster And I just screenshotted the AI convert this to m p 3, and scaffold out the show notes.

Wes Bos

where the steps must be done perfectly and you Yeah. Hopefully shouldn't miss something AppleScript itself, I have written

Topic 10 04:58

Scripts can validate markdown format for show notes

Scott Tolinski

to re Node it or any of that stuff. But, man, it's it's totally inaccessible project. And if one thing's made FFmpeg more accessible than anything else, it's chat GPT because you can ask all sorts of questions about it. So AI YouTube descriptions directly from Or I I've done little scripts as Raycast extensions Wes Raycast is essentially just going off and hitting a script. You know, we were doing a Vercel of tutorials newsletter.

Wes Bos

It it's true. Like, I And what I did is I just took the transcript.

Scott Tolinski

service, and I was using actual raw frames,

Wes Bos

compress the MP 3 a little bit much. We don't need the bit rate for just for just, spoken word. Yeah. And I was like, yeah. Just use chat gpt, and it'll kick out the you just tell it what you want it to do, and it'll kick out the actual, to just build a little website with a drop zone,

Scott Tolinski

pipe in like a stream into FFmpeg

Scott Tolinski

capture, you can navigate

Wes Bos

FFmpeg is just like we might even do a whole different show on FFmpeg, but it's it's amazing, that tool, of everything that it possibly does. And it always it always just works. Yeah. I was I I was getting deep into

Scott Tolinski

the kind of stuff you're doing,

Scott Tolinski

which are massive. And it's amazing how you could

Wes Bos

Randy was, like, googling for

Scott Tolinski

video

Wes Bos

crazy long FFmpeg command for you. And it's amazing. It almost works every single time. Yeah. Amazing.

Topic 11 12:40

AI transcript helps find clips in episodes

Wes Bos

value, I think you could

Scott Tolinski

YouTube video that's formally Vercel up tutorials ever. I'm throwing them in a SQLite database. I'm doing the find and doing the replace locally, and then I'm pushing up via the IDs and the changes TypeScript. You could do a find and replace over 2,000 YouTube videos Node descriptions.

Scott Tolinski

our our video. That seems really cool.

Scott Tolinski

Let's talk about, like, what types of scripts you can do because we we've just kind of been pontificating about stuff that we have done, and we can get back into some more examples as well.

Scott Tolinski

in that process, we were able to in Markdown.

Scott Tolinski

write YouTube descriptions as well? We I mean, we would be able to automate

Wes Bos

get a lot of value out of that.

Wes Bos

I put it ESLint Claude, and I just gave it bridge between those 2 things would be really neat.

Wes Bos

That made it so much faster because I didn't have to just sit there and listen to the whole thing again to scrub and find the parts. I could just visually see where they were. So input.

Scott Tolinski

Well, what if one thing that we needed to do is to be able to essentially validate that markdown. Now granted, we threw this in a GitHub action. The GitHub action's essentially running JavaScript

Wes Bos

topics

Scott Tolinski

Yeah. You know, one thing I think about too in this space is I'm working on a YouTube

Wes Bos

if someone doesn't provide chapters, at least you can certainly Alright. Let's talk about, the first one, which is we'll say the problem that Randy had. So we are doing a podcast now that is

Wes Bos

the thing is answered, and it's it's pretty decent. So, obviously, they have that information.

Scott Tolinski

ever or every

Wes Bos

the prompt that says, give me the somebody who is not a developer is always a a tricky thing to do because you have to morphed together type of thing. And, like, another thing we do is

Scott Tolinski

I think there is some AI chapter features coming in YouTube. I saw some some beta something for that. But Oh, awesome.

Wes Bos

and then

Scott Tolinski

API. You just I I'm pulling in every one of the things that it does is it checks every link to make sure that the links are resolved. Therefore, we won't get any broken links. It already found a video or a podcast file that, we ask Node developers to work in markdown,

Scott Tolinski

find and replace tool. There's these that exist at TubeBuddy. They're expensive. But I I I started working on 1 myself, and it turns out it's it's relatively simple if you know the YouTube, fit a very specific format because

Scott Tolinski

episode of Syntax we have the FFmpeg isn't the problem. It it can chug through anything and spit out a video. So I I was so impressed once I started getting into deeper into FFmpeg land. I've almost always just used it via a UI, drop in a video Yeah. Totally.

Topic 12 15:13

Ways to run scripts - executable, Raycast extension, etc

Scott Tolinski

So for me, that was, like, a huge productivity boost for both of us because

Scott Tolinski

Mhmm. You can even choose to run that from other means.

Scott Tolinski

I I, you know, I I automated that thing that would always be plaguing me, and it made it much easier.

Share

Empowering developers for over 286196993715 milliseconds!