Use Your Time Wisely
Last night was my first “free” night in a while.
…and I spent it coding.
When I’ve been uploading images, I’ve been doing it all by hand. I’ve also been creating the thumbnails by hand. It’s not difficult to do, but it’s very repetitious and kinda a waste of time. The other problem was that they were never added to my image gallery on my site, which was bugging me.
So what I did was took some pre-existing tools that I had, modularized some of the functionality, modified what was left and built a tool to automate some of the nonsense that I’ve been doing by hand.
I created
- A script that takes an image as a parameter and generates a thumbnail. Very simple, relatively quick.
- A script that takes an image as a parameter and adds an entry for it into the image gallery database on my webserver.
- A shell script wrapper that manages the above two scripts and handles the transferring of the files to the webserver. All you have to do is run it in a directory where there are JPEGs and it will preform the above actions on each file there.
It took me a few hours to get everything working, but this was all while watching TV, feeding the cats and chatting. All-in-all, not that bad. And I also have the two core scripts that I can use if I need to do anything by hand as well. I wanted to make sure the functionality was isolated enough that I could utilize them without unintended results. In other words, the scripts are also useful as stand-alone tools outside of the scope of the ultimate tool that I designed.
This was an exercise in me designing a tool that would fit into my current digital workflow, instead of having to modify my workflow around limitations of tools that were already available. While I’m aware that not everyone is able to write their own tools, I think it’s important to be able to modify those at your disposal to make sure that your workflow is as native to how you feel it “should be”. The more natural your workflow feels, the more productive you’ll be.
For me, this was a good time investment.
I also ran the tool against a ton of image directories and have updated my image gallery on my site. For regular visitors, they’ve probably already seen most of them, but for others, you can find it here.