jmathai / elodie

An EXIF-based photo assistant, organizer and workflow automation tool.
https://bit.ly/introducing-elodie
Apache License 2.0
1.27k stars 139 forks source link

Microsecond in filename not working #363

Open thomaspriv opened 4 years ago

thomaspriv commented 4 years ago

Hi There!

First of all a big thanks for all the work which has been done on elodie!

But I noticed an issue when trying to create a basic config file with the option below and noticed that the microseconds code is not working.

https://strftime.org/ --> %f Microsecond as a decimal number, zero-padded on the left. 000000

config file

[File]
date=%Y-%m-%d_%H:%M:%S-%f
name=%date-%original_name.%extension
# -> 2012-05-01_11:11:11-00000.extension

command used ./elodie.py import --debug --destination="/home/thomas/output" /home/thomas/pictures

resulting file name 2020-03-14_09:44:46-%f-img_20200314_094444.jpg

Could you maybe tell me if i'm doing something wrong?

Already a big thanks in advance!

Kr, Thomas.

jmathai commented 4 years ago

Looks like the issue is that the strftime available in time does not have microsecond precision. I suggest we look at using strftime from datetime instead.

https://stackoverflow.com/a/6677762