From 2e324123b6fdf6416627f603ced04148c483e5db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= Date: Sun, 31 Dec 2017 17:57:15 -0500 Subject: [PATCH] include camera model and shorten exif stats MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This adds a line to show the camera model and make, if available, and reorders and cleans up the EXIF parameters extracted so they are more readable for photographers (who are the ones who care about this anyways). Note that, as a photographer, I know what "Fstop" mean, but I would expect "exposure" or the common f/X.Y notation. The "Focal" label means nothing to me: "Focal length" would mean something, but it's long - and what are the units? Just using "mm" here clarifies any possible misunderstanding. I have found this format to be way more readable. The following: ISO: 3200, Focal: 50, Exposure: 1/40, Fstop: 4.0 Date: dimanche, 31. décembre 2017 Becomes: ISO 3200, 1/40s f/4.0, 50mm FUJIFILM X-T2 dimanche, 31. décembre 2017 Now: dropping the explicit labels may be controversial, but I would argue this is what markup is for. We could wrap those elements in named or elements to provide more information through mouse-over or CSS. --- sigal/themes/galleria/templates/index.html | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/sigal/themes/galleria/templates/index.html b/sigal/themes/galleria/templates/index.html index 706a698..6013859 100644 --- a/sigal/themes/galleria/templates/index.html +++ b/sigal/themes/galleria/templates/index.html @@ -79,18 +79,21 @@ {%- if media.exif %}
- {% if media.exif.iso %}ISO: {{ media.exif.iso }}, {% endif %} - {% if media.exif.focal %}Focal: {{ media.exif.focal }}, {% endif %} - {% if media.exif.exposure %}Exposure: {{ media.exif.exposure }}, {% endif %} - {% if media.exif.fstop %}Fstop: {{ media.exif.fstop }}{% endif %} + {% if media.exif.iso %}ISO {{ media.exif.iso }}, {% endif %} + {% if media.exif.exposure %}{{ media.exif.exposure }}s, {% endif %} + {% if media.exif.fstop %}f/{{ media.exif.fstop }}, {% endif %} + {% if media.exif.focal %}{{ media.exif.focal }}mm {% endif %} {% if media.exif.gps %}
Location: {{ 'N{:.6f}'.format(media.exif.gps.lat) if media.exif.gps.lat > 0 else 'S{:.6f}'.format(-media.exif.gps.lat) }} {{ 'E{:.6f}'.format(media.exif.gps.lon) if media.exif.gps.lon > 0 else 'W{:.6f}'.format(-media.exif.gps.lon) }} {% endif %} + {% if media.exif.Make or media.exif.Model %} +
{{ media.exif.Make }} {{ media.exif.Model }} + {% endif %} {% if media.exif.datetime %} -
Date: {{ media.exif.datetime }} +
{{ media.exif.datetime }} {% endif %} {% endif %} {%- endmacro %}