summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-06-04 10:06:33 +0200
committerDaniel Friesel <derf@finalrewind.org>2021-06-04 10:06:33 +0200
commit1c9f21549fab543bcdb949f8003ae22f01edc6b1 (patch)
tree91cbbf58d8d6ef62fb70fc65e6ecbbfc44990d0d /bin
parent5cc1560c51ce452146a30e295cd5fc4903c8539d (diff)
detail page: add focus mode and software information
Diffstat (limited to 'bin')
-rwxr-xr-xbin/pyggle26
1 files changed, 24 insertions, 2 deletions
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"""<span class="focus-distance">{lower} – {upper}</span>"""
)
+ def set_focus_mode(self, mode):
+ self.focus_mode = f"""<span class="focus-mode">{mode}</span>"""
+
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"""<span class="makemodel">{make} {model}</span>"""
+ def set_software(self, software):
+ self.software = f"""<span class="software">{software}</span>"""
+
def set_subject_distance(self, distance):
if distance < 10000:
self.subject_distance = (
@@ -195,12 +203,16 @@ class ImageHTML:
buf += f"<tr><th>Modus</th><td>{self.exposure_program}</td></tr>\n"
if self.exposure_mode:
buf += f"<tr><th>Belichtung</th><td>{self.exposure_mode}</td></tr>\n"
- if self.flash:
- buf += f"<tr><th>Blitz</th><td>{self.flash}</td></tr>\n"
+ if self.focus_mode:
+ buf += f"<tr><th>Fokus</th><td>{self.focus_mode}</td></tr>\n"
if self.subject_distance:
buf += f"<tr><th>Entfernung</th><td>{self.subject_distance}</td></tr>\n"
if self.focus_distance:
buf += f"<tr><th>Schärfebereich</th><td>{self.focus_distance}</td></tr>\n"
+ if self.flash:
+ buf += f"<tr><th>Blitz</th><td>{self.flash}</td></tr>\n"
+ if self.software:
+ buf += f"<tr><th>Software</th><td>{self.software}</td></tr>\n"
buf += "</table></p></div>\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()