From 1c9f21549fab543bcdb949f8003ae22f01edc6b1 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 4 Jun 2021 10:06:33 +0200 Subject: detail page: add focus mode and software information --- bin/pyggle | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/pyggle b/bin/pyggle index 656846f..4018fe5 100755 --- a/bin/pyggle +++ b/bin/pyggle @@ -69,7 +69,9 @@ class ImageHTML: self.flash = None self.focal_length = None self.focus_distance = None + self.focus_mode = None self.iso = None + self.software = None self.subject_distance = None def set_datetime(self, dt): @@ -93,6 +95,9 @@ class ImageHTML: f"""{lower} – {upper}""" ) + def set_focus_mode(self, mode): + self.focus_mode = f"""{mode}""" + def set_focus( self, f_num, exposure, focal_length, focal_length35, crop_factor, iso ): @@ -138,6 +143,9 @@ class ImageHTML: def set_makemodel(self, make, model): self.make = f"""{make} {model}""" + def set_software(self, software): + self.software = f"""{software}""" + def set_subject_distance(self, distance): if distance < 10000: self.subject_distance = ( @@ -195,12 +203,16 @@ class ImageHTML: buf += f"Modus{self.exposure_program}\n" if self.exposure_mode: buf += f"Belichtung{self.exposure_mode}\n" - if self.flash: - buf += f"Blitz{self.flash}\n" + if self.focus_mode: + buf += f"Fokus{self.focus_mode}\n" if self.subject_distance: buf += f"Entfernung{self.subject_distance}\n" if self.focus_distance: buf += f"Schärfebereich{self.focus_distance}\n" + if self.flash: + buf += f"Blitz{self.flash}\n" + if self.software: + buf += f"Software{self.software}\n" buf += "

\n" return buf @@ -296,6 +308,16 @@ class Thumbnail: except KeyError: pass + try: + self.html.set_software(self.exif_tag["Image Software"]) + except KeyError: + pass + + try: + self.html.set_focus_mode(self.exiftool["MakerNotes:FocusMode"]) + except KeyError: + pass + def _get_focus(self): entries = list() -- cgit v1.2.3