Since I left Facebook for good, I realized how much I liked a simple yet nice feature. Every day, Facebook would show me photos I took on this day a year ago. Although I wasn’t sharing a lot of photos on Facebook, I enjoyed receiving these small greetings from the past. With Facebook banished from my life, I decided to build an open source tool that does the same with my local photo library.
I already had a rough script that sort of worked (“sort of” being the operative word), but it required some serious work to be of any practical use. So I spent a few days improving, enhancing, and optimizing the prototype. I named the project Natsukashii1 and released it on GitLab.
Natsukashii consists of two parts: a Bash shell script that finds photos taken a year ago, and a simple PHP page that displays the results. The shell script relies on standard tools that are available on most mainstream Linux distributions (ImageMagick, ExifTool, sed, seq, and find). This means that you can deploy Natsukashii on practically any machine running a modern Linux distro. With a little bit of work, it is also possible to run Natsukashii on NAS appliances. In fact, I’m running the tool on my QNAP TS-231P NAS. The project’s README file provides brief instructions on installing and using Natsukashii, with detailed info available in the Linux Photography book.
While Natsukashii does the job, it isn’t particularly elegant and fast. The script goes through the specified directory and all its subdirectories looking for files with the given extension (e.g., JPG). For each found photo, the script extracts its creation date and compares it with the current date. Obviously, this takes time and resources. So if you have several thousand photos on your machine, running the script may take some time. So it might be a good idea to set up a cron job that runs the script during the night.
1If you look up the word Natsukashii in a Japanese-English dictionary, you might find something like “dear,” “desired,” or “missed.” But that’s not really what it means; it’s just that there’s no way to directly translate it into English. Natsukashii is used to communicate a feeling of “Awww, I remember that! Those were such nice times, just thinking about it makes me feel so… natsukashii.” (source: justin-klein.com/natsukashii)