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

Support for offset in dates

renanlecaro opened this issue · comments

As a party photographer, i'm often shooting pictures from 8pm to 4am. It would be nice to have a comvenient way to tell the program to offset timestamps to let a "day" start and end at 6am instead of 0am, this way party pictures would not be split in different directories before and after midnight.

A perfect but more complex way to handle grouping of photos would be to check for time difference between file, and always group in the same folder photos that are shot less than 30min from each other (This criteria should be customisable). The date of the photos group could be the date of the average timestamp of the group.

I've addressed this issue with the simpler approach for now. You can add a flag --day-begins 6 if you want the "start" of the day to be 6AM. I like the second approach better, but currently the code is setup to parse each file one at a time. In order to do the second approach I'd need to run through all the files to cache the date info, process that, then run through again to move the photos. I'll think about making that kind of change later on perhaps, but for now this command line switch should hopefully help.

Excelllent ! All muy wishes are comming true !

I realized that I accidentally fixed this only for the time stamp method and not for the exif method. I'll fix it for the exif method in the next day or two.

On Sun, Mar 16, 2014 at 4:51 AM, renanlecaro notifications@github.com
wrote:

Excelllent ! All muy wishes are comming true !

Reply to this email directly or view it on GitHub:
#6 (comment)

Maybe those 2 methods should just return a date object, instead of
pre-formatted dates in a string tuple ? It would make the code easier to
modify :)

Renan LE CARO
Etudiant Ingénieur Informatique à l'université de Technologie de Compiègne

On Sun, Mar 16, 2014 at 3:26 PM, andrewning notifications@github.comwrote:

I realized that I accidentally fixed this only for the time stamp method
and not for the exif method. I'll fix it for the exif method in the next
day or two.

On Sun, Mar 16, 2014 at 4:51 AM, renanlecaro notifications@github.com
wrote:

Excelllent ! All muy wishes are comming true !

Reply to this email directly or view it on GitHub:
#6 (comment)

Reply to this email directly or view it on GitHubhttps://github.com//issues/6#issuecomment-37758402
.

yep. should be fixed now.