As will quickly become clear, I have been updating the image-titler script quite a bit lately. Naturally, I could have written a major update piece, but I figured I’d write separate updates for each new feature. In this article, we’ll cover the version tagging feature.
Table of Contents
What Is Version Tagging?
As someone who manages quite a bit of content, I sometimes find myself needing to update content from time to time. Unfortunately, it can be hard to tell what’s new and what’s old. Luckily, software folks solved this issue a long time ago with semantic versioning.
In my case, I version the image-titler script whenever I update it. For example, I updated it to 1.6.0 when I added the version tagging feature. Of course, if I were to use this new version to generate new images, we would never know which version of the software generated the image. That’s where version tagging comes in.
Now, whenever an image is processed with image-titler, the version of the package will be tagged onto the image. For example, if image-titler 1.6.0 is used to generate a new thumbnail, that version will show up at the end of the file name:
Now, whenever an image is generated, I don’t have to question which version of the software generated it.
Why Add Version Tagging?
The rationale behind this decision is completely selfish. First, I operate a WordPress website and I occasionally need to generate new thumbnails. When I do that, I don’t want to have to come up with a new name for the image. To avoid name clashes, the version tagging helps me out.
Another reason why I chose to do this was to maintain history of image generation. Including versions in file names helps me keep track of the history of an image. If for some reason I decide to rollback an image, I can do that.
image-titler-sample-v1.6.0.jpg # Older image image-titler-sample-v1.7.0.jpg # Newer image
Finally, by versioning images, I can now decide to use a specific version of the image-titler to get a specific style of image. It’s possible that future versions of the image-titler may discontinue features, so it’s nice to be able to know which version of the software created a certain image.
Why Not Use EXIF Data?
This was something I had considered, but it doesn’t solve my name clash issue. That said, in the future, I will probably include some sort of EXIF data to indicate that a file was generated using image-titler.
One thing I’d like to do is include the version information in the EXIF data as well as the file name, so I can still access the version if its scrubbed from the file name. Perhaps I’ll add a tag as follows:
That said, this wasn’t enough of a reason to include EXIF data just yet.
Honestly, there wasn’t much in this update. I did a little bit of source code cleanup. Likewise, I had to include a new package to be able to read the version information.
The good news is that there have been at least two other minor updates since this was published. As a result, you can expect at least two more upcoming update articles.
In the meantime, show me some love by heading over to my list of ways you can support the site. Just about everything I do is free, so your support is greatly appreciated.
Otherwise, check out these related articles:
Thanks again for stopping by! See you next time.
The ACT/SAT discourse is back, and I found a pretty cool article debunking many of the common arguments for them.
The Sample Programs repository is in its fourth Hacktoberfest. Are you interested in making a contribution?