bep / gallerydeluxe

Fast Hugo gallery theme/module suitable for lots of images.
MIT License
146 stars 31 forks source link

Exif Getting Multiple Info #6

Closed andremoreno closed 2 years ago

andremoreno commented 2 years ago

Thanks for the adding the exif info.

before, i just dict each tags i need instead using "Exif" .Exif.Tags in init.html, because i have no idea how to parse ExposureTime|*big.Rat":"1/100 or "FocalLengthIn35mmFilm|int":"28" using javascript. 🤣 And I'm imagining the exif info will be on top / bottom of the image (just like the other lightbox) never thought about showing on overlay like this.. 👍


So i'm testing the exif updates, and modify the exif part from the config.toml into:

includeFields = 'Artist|Make|Model|LensModel|FocalLength|FNumber|ExposureTime'

and the exif info is showing more tags because of the 'almost same' tags.. (i dont know how to say it correctly)

{"Exif":{"Lat":0,"Long":0,"Date":"2022-10-01T12:16:39+07:00","Tags":{"ExposureTime|*big.Rat":"1/100","FNumber":1.9,"FocalLength":3.7,"FocalLengthIn35mmFilm|int":"28","Make":"samsung","MakerNote":"0100 Z@P","Model":"SM-A710F"}}}

this is the content of json file. maybe because i put the "FocalLength", so the "FocalLength" and the "FocalLengthIn35mmFilm" is inserted too.. and "Make" is almost the same with "MakerNote" ..

this is the screenshoot:

hglahsldgkhsdhgds

test url: https://splendid-pastelito-2af510.netlify.app/ test repo: https://github.com/andremoreno/gallerydeluxe

once again thank you..

bep commented 2 years ago

includeFields/excludeFields takes a regexp, you need to find an expression that only matches what you want, e.g. Focal Length$