Closed sebastiaan-lampo closed 2 years ago
Thanks a lot for these PRs @sebastiaan-lampo! I'll try to make sure to take a detailed look at them as soon as possible.
If you like both features Gertjan then I can replace these PR's with another one in which I've merged both branches and implemented combined both features. I didn't just want to assume that you consider them good broad use cases.
Use PIL's TAGS to deal with EXIF. Use iptcinfo3 to deal with IPTC tags. Allows to use these as fallback options for copyright and caption of photos. As a sample use-case reads captions from the photos and the album copyright can be determined from the copyright of the photos in it. Will not change the default behaviour without adding the setting tag_map, exif or iptc to the configuration file. If the copyright use-case is not desired, drop the changes to the album.py file in their entirety.
To make it work more easily, without constant try except clauses for every setting possible, the Settings object now returns None when accessing a property that is not set instead of throwing an AttributeError. I left this fundamental change to the codebase as a separate commit but not changing this behaviour will require a re-write of some code in this pull request.
This feature is the baseline for integrating with #31 to output EXIF/IPTC tags into the front matter of every photo.