Code is alright, but I have always been looking for opportunities to write small scripts, little things to automate life. Now, when I have the opportunity, I was only too glad to indulge myself.
I have been maintaining a photo-log since a few days, and that means a lot of photos everyday. The least I hope to gain out of this exercise is to know how my life progressed over a year.
So I figured I would have to name them consistently with their date and time as the file names.
What would let me do this ? Either have the camera’s processor run the code (very far-fetched, true, but it might be a possibility) or have a script on my computer to do the same.
So I chose this opportunity to write a small Python script to rename all photos in a folder in such a fashion.
What it exactly does is :
Supply the path to a photo folder as a command line argument, something like :
python phototime.py –ftype=filetype –path=filepath
and the rest is taken care of.
As an additional step, you could copy it to your “bin” folder which is in the shell path, rename it as “phototime” without the “.py” extension, make it executable (chmod a+x), and then enjoy the added ease of use. A more detailed documentation is on the Github page linked below
I’ve uploaded the project to a Github repository. You can download it from here.
Please leave back feedback if its useful or if it sucked. Remarks and suggestions for modifications are most welcome.