New blogging scripts

2025-10-25 20:56:01 +01:00 by Mark Smith

Marmite

Feeling quite under the weather today. Rough day yesterday, and today I’ve got a sneezy cold that’s been steadily gaining momentum the entire day. One presses on nevertheless. Some progress in my blogging setup.

I decided to do an overhaul of all the bash scripts I use for day to day blogging. I use a static site generator to build the blog, but separate to that I previously had a very basic bash script combined with some aliases that enabled me to very quickly create new empty markdown files for each type of post, with all the right frontmatter, and name the files correctly. It sort of worked okay but there were some weirdnesses. Actually quite a few weirdnesses, and the aliases had become ridiculously complicated.

I figured maybe this was a good task to work on with Gemini. I've been looking at these scripts for years, so couldn't really see any obvious way to improve them. I knew there would be, but I needed a fresh pair of eyes. So I cut and pasted the mess of scripts and aliases into the chat, and briefly explained how it all worked. To my surprise Gemini fully understood how everything connected together, totally understood what I was trying to achieve and made some very impressive suggestions.

Before long we had a 4 phase plan to refactor everything, and within a few hours we had everything working. There is a new master script that has absorbed much of the logic that was scattered across the aliases and the updated aliases are neat and tidy, and look great.

What’s more while we were working on the plan I mentioned that one thing that would be great was to streamline the workflow I use for adding images to posts, which was really convoluted. Gemini figured out a really great way to cut out almost all of the hassle, so now adding an image is super simple.

The other thing that is loads better is adding links. The script automatically adds and commits the changes to the git repo, so lots of the tedium and choreiness has evaporated. #

For enquiries about my consulting, development, training and writing services, aswell as sponsorship opportunities contact me directly via email. More details about me here.