TheLastGimbus / GooglePhotosTakeoutHelper

Script that organizes the Google Takeout archive into one big chronological folder
https://aur.archlinux.org/packages/gpth-bin
Apache License 2.0
3.48k stars 176 forks source link

Can't get date on -modifié.jpg files #204

Closed palijn closed 1 year ago

palijn commented 1 year ago

Well, the dates can still not be found on the -modifié.jpg files, although it's - to me - quite clear it is in the filename. Last run of GPTH 3.4.1 :

Guessing dates from files : █████................................... 1994/14886  
Can't get date on Takeout/Google Photos/Photos from 2015/IMG-20150118-WA0000-modifié.jpg
Guessing dates from files : █████................................... 1997/14886  
Can't get date on Takeout/Google Photos/Photos from 2015/IMG-20150101-WA0001-modifié.jpg
Guessing dates from files : ████████████████........................ 6254/14886  
Can't get date on Takeout/Google Photos/Photos from 2014/IMG-20150101-WA0000-modifié.jpg
Guessing dates from files : ████████████████........................ 6265/14886  
Can't get date on Takeout/Google Photos/Photos from 2014/IMG-20141228-WA0000-modifié.jpg
Guessing dates from files : ████████████████........................ 6266/14886  
Can't get date on Takeout/Google Photos/Photos from 2014/IMG-20141227-WA0002-modifié.jpg
Guessing dates from files : ████████████████........................ 6267/14886  
Can't get date on Takeout/Google Photos/Photos from 2014/IMG-20141227-WA0001-modifié.jpg
Guessing dates from files : ████████████████........................ 6268/14886  
Can't get date on Takeout/Google Photos/Photos from 2014/IMG-20141227-WA0000-modifié.jpg
Guessing dates from files : ████████████████........................ 6270/14886  
Can't get date on Takeout/Google Photos/Photos from 2014/IMG-20141226-WA0001-modifié.jpg

Can't get date on Takeout/Google Photos/Photos from 2014/IMG-20141226-WA0000-modifié.jpg
Guessing dates from files : ████████████████........................ 6288/14886  
Can't get date on Takeout/Google Photos/Photos from 2014/IMG-20141225-WA0001-modifié.jpg

Can't get date on Takeout/Google Photos/Photos from 2014/IMG-20141225-WA0000-modifié.jpg
Guessing dates from files : ████████████████........................ 6326/14886  
Can't get date on Takeout/Google Photos/Photos from 2014/IMG-20140926-WA0000-modifié.jpg
Guessing dates from files : █████████████████....................... 6365/14886  
Can't get date on Takeout/Google Photos/Photos from 2014/IMG-20140916-WA0000-modifié.jpg
Guessing dates from files : █████████████████....................... 6399/14886  
Can't get date on Takeout/Google Photos/Photos from 2014/IMG-20140905-WA0000-modifié.jpg

here, grab the nightly with those added :)

https://github.com/TheLastGimbus/GooglePhotosTakeoutHelper/actions/runs/4585888986

:o turned out i had a function for matching something-edited.jpg in any language, but it didn't support accent characters because of regex :laughing: - added this in a0dd2842

now check it out :) - https://github.com/TheLastGimbus/GooglePhotosTakeoutHelper/actions/runs/4588597120

Originally posted by @TheLastGimbus in https://github.com/TheLastGimbus/GooglePhotosTakeoutHelper/issues/174#issuecomment-1493179649

TheLastGimbus commented 1 year ago

can you show here the names of the jsons that should be found?

i have tests from them like this:

https://github.com/TheLastGimbus/GooglePhotosTakeoutHelper/blob/959b78b0a3c2e926c159ba67498a83ffaa6b39f5/test/gpth_test.dart#L43-L45

https://github.com/TheLastGimbus/GooglePhotosTakeoutHelper/blob/959b78b0a3c2e926c159ba67498a83ffaa6b39f5/test/gpth_test.dart#L122-L135

and they pass :eyes:

palijn commented 1 year ago

Mmh, let's have a look :

Takeout/Google Photos/Photos from 2015 % grep IMG-20150118-WA0000-modifié.jpg *.json Takeout/Google Photos/Photos from 2015 % grep IMG-20150118-WA0000 *.json
IMG-20150118-WA0000.jpg.json: "title": "IMG-20150118-WA0000.jpg",

Takeout/Google Photos/Photos from 2015 % grep IMG-20150101-WA0001-modifié.jpg *.json Takeout/Google Photos/Photos from 2015 % grep IMG-20150101-WA0001 *.json
IMG-20150101-WA0001.jpg.json: "title": "IMG-20150101-WA0001.jpg",

Is that good for you ?

palijn commented 1 year ago

If I correctly read your tests, they expect one json file per -modifié jpg. However, the -modifié jpg do not have their own json files, the only reference to the file is to be found with the filename root in the un-modified json file.

TheLastGimbus commented 1 year ago

Look again - the test are expecting to find the original non-modified file json, as they should

I see you printed their jsons, but could you just show the filenames themselves? As many as you can

palijn commented 1 year ago

Well, the grep does show the file name before the matching contents, and I grepped every json file in the folder (*.json)… So, there is only 1 json file that matches, such as IMG-20150118-WA0000.jpg.json or IMG-20150101-WA0001.jpg.json.

TheLastGimbus commented 1 year ago

Hi! I looked into this again, i still have no idea - it works perfect in the tests... - do you still have this problem

ps. again big thanks for the help you give people around here <3

palijn commented 1 year ago

Hi! I looked into this again, i still have no idea - it works perfect in the tests... - do you still have this problem

I have no idea honestly. I got my Takeouts to leave GPhotos forever, so, now I'm basically done with them. There were not so many -modifié files, I simply moved them by hand close to the original file.

You're welcome, I like giving back help.