AI quick scripts

Discourse’s backups are SQL, but I needed a Markdown or HTML export. I asked ChatGPT to write a quick Ruby script that loops over the possible post IDs and downloads the Markdown using the special “/raw” URLs in Discourse. Reviewed it line by line and tweaked it slightly, but it was essentially correct on the first try. It took minutes from conception to running.

Maybe there was an existing Discourse solution for this. But the fact that in the time it would take to find and install another solution, I could have AI write my own custom solution… Still just amazing.

prealpinux

It sounds good 😏

Alexander Kucera

when it works, it’s amazing. But it gets tricky when it confidently presents a solution that is just flat out wrong. I had that happen on a number of occasions and the results always sound almost right until you take a closer look. Very deceiving.

Manton Reece

@AlexKucera That’s true. This was only maybe 20 lines, so I could read the whole thing quickly and confirm that it was more or less how I would’ve written the code. Always have to check.

Jamie Thingelstad

I did a similar thing to script import to micro.blog. ChatGPT knows the micro.blog API too! :-)

Manton Reece

@jthingelstad That’s cool!

Manton Reece @manton
Lightbox Image