From 7b10911598ae38599f783f24843ed1645d55958b Mon Sep 17 00:00:00 2001 From: tudacs Date: Tue, 18 Dec 2018 08:02:20 +0100 Subject: [PATCH] Add IPTC Headline (2:105) and to iptc_data According to iptc.org, the 'title' field (2:05) is "a shorthand reference for the digital image" and may (User Note) be the filename, whereas the IPTC Headline is defined as "A brief synopsis of the caption.". Thus the headline should be used by sigal to provide a short description, instead of the title tag. --- sigal/image.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sigal/image.py b/sigal/image.py index 728a1e1..5a4c81a 100644 --- a/sigal/image.py +++ b/sigal/image.py @@ -248,6 +248,10 @@ def get_iptc_data(filename): if raw_iptc and (2, 120) in raw_iptc: iptc_data["description"] = raw_iptc[(2, 120)].decode('utf-8') + # 2:105 is the IPTC headline property + if raw_iptc and (2, 105) in raw_iptc: + iptc_data["headline"] = raw_iptc[(2, 105)].decode('utf-8') + return iptc_data