Skip to content

Accept bad date format from Canon IJ scanner(s) #353

@rob-miller

Description

@rob-miller

I'm sorry I'm not set up to do a PR for this. I'm sorry if I missed a documented option to solve this somewhere.

I have a Canon CanoScan LiDE 400 scanner. The jpeg files it generates have exif dates that erroneously use '/', which Photini complains about every time it loads one of these.

If line 231 of the file types.py is modified such that:

#_date_re = re.compile(r'(\d{1,4})[:-]?(\d{1,2})?[:-]?(\d{1,2})?$')
_date_re = re.compile(r'(\d{1,4})[:\-/]?(\d{1,2})?[:\-/]?(\d{1,2})?$')

then this failure of the Canon software will not be complained about and disturb the Photini user.

In no way do I wish to suggest that this is the optimal solution, but it is the path of least resistance and since I made the effort to work it out (admittedly with Claude's help), I am sharing in the hopes that it can be absorbed and save other people time. And also not bite me again when I next update.

Many, many thanks for Photini, it is exactly the solution I needed.

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions