From 4824c7d4d65ec6738e05eaf71d516f5ec68a6b15 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 10 Jun 2021 06:18:57 +0200 Subject: details: add EV/LV data --- bin/pyggle | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/bin/pyggle b/bin/pyggle index 4018fe5..1c29295 100755 --- a/bin/pyggle +++ b/bin/pyggle @@ -62,6 +62,7 @@ class ImageHTML: self.make = None self.focus = None + self.ev = None self.exposure = None self.exposure_mode = None self.exposure_program = None @@ -71,12 +72,16 @@ class ImageHTML: self.focus_distance = None self.focus_mode = None self.iso = None + self.lv = None self.software = None self.subject_distance = None def set_datetime(self, dt): self.datetime = dt.strftime("""%d.%m.%Y %H:%M""") + def set_ev(self, ev): + self.ev = f"""{ev} EV""" + def set_exposure_mode(self, exposure_mode): self.exposure_mode = f"""{exposure_mode}""" @@ -140,6 +145,9 @@ class ImageHTML: def set_gps(self, gps): self.gps = f"""{gps.location}""" + def set_lv(self, lv): + self.lv = f"""{lv} LV""" + def set_makemodel(self, make, model): self.make = f"""{make} {model}""" @@ -198,6 +206,14 @@ class ImageHTML: buf += f"ISO{self.iso}\n" if self.focal_length: buf += f"Brennweite{self.focal_length}\n" + if self.ev or self.lv: + if self.ev and self.lv: + text = f"{self.lv} / {self.ev}" + elif self.ev: + text = self.ev + elif self.lv: + text = self.lv + buf += f"Helligkeit{text}\n" buf += " \n" if self.exposure_program: buf += f"Modus{self.exposure_program}\n" @@ -318,6 +334,21 @@ class Thumbnail: except KeyError: pass + try: + self.html.set_focus_mode(self.exiftool["MakerNotes:FocusMode"]) + except KeyError: + pass + + try: + self.html.set_ev(self.exiftool["MakerNotes:MeasuredEV"]) + except KeyError: + pass + + try: + self.html.set_lv(self.exiftool["Composite:LightValue"]) + except KeyError: + pass + def _get_focus(self): entries = list() -- cgit v1.2.3