andrewning / sortphotos

SortPhotos is a Python script that organizes photos and videos into folders using date/time information

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use ITPC 'Event' field in destination folder structure

trommegutten opened this issue · comments

I love this script! Very nice work:) Thank You!

I have all images and movies sorted like /2015/01-january/2015-01-01-hhmmss_originalfilename.jpg

Some of my photos are from special happenings, and then I have used the ITPC 'event' tag to describe the event at witch the photo was taken, e.g. 'Wedding Kari&Ola'. If the photo includes this 'event'-tag, I would love to automagically make a special folder inside the month 'yyyy-mm-dd Special event', strip slashes. The total folder structure like this: /2015/01-january/2015-01-01 Special event/2015-01-01-hhmmss_originalfilename.jpg

If it's possible, I also would love to have all the photos from the same event be mapped to the first date when the event started, e.g. same event the next day '2015-01-02 Special event' should also be mapped to folder '2015-01-01 Special event'.

Is this process possible to automate with some adjustments?

Good question. That wouldn't be a quick change. I'd accept pull requests to do renaming in a more general way. You might take a look at using exiftool directly. If it just renaming you are after, it has some pretty flexible renaming capabilities:
http://www.sno.phy.queensu.ca/~phil/exiftool/filename.html

I'd love to see this in an even more automated way.

E.g. have the tool look at timestamps to find bursts of photo activity, separated from others, and ask what "event" was going on then, and/or offer the user the ability to modify the start/stop times or split and merge these bursts of activity in to real events.

Then it could offer to create the sorts of event-based folders @trommegutten is suggesting.

One approach to identifying events from the timestamps would be to do a Kernel density estimation on the timestamps, parameterized for event widths of interest (1 hour meeting, 1 week vacation), and chop the timeline up using the local minima of the resulting curve.

Events could be identified via other data too, alone or clustered in combination with timing data, e.g. geolocation.