From ff073515be5166d8e72bfac34c9be7d3ee41c6e8 Mon Sep 17 00:00:00 2001 From: "Rob G. Healey" Date: Sun, 15 Nov 2009 05:12:34 +0000 Subject: [PATCH] Added Image Exif Tags back into NarrativeWeb. Need to download and install pyexiv2 to see them though. svn: r13583 --- src/plugins/webreport/NarrativeWeb.py | 29 ++++++++++++++------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/src/plugins/webreport/NarrativeWeb.py b/src/plugins/webreport/NarrativeWeb.py index 1df125a92..c2131841e 100644 --- a/src/plugins/webreport/NarrativeWeb.py +++ b/src/plugins/webreport/NarrativeWeb.py @@ -502,19 +502,15 @@ class BasePage(object): else: self.place_list[place_handle] = [lnk] - place = self.place_link(place_handle, ReportUtils.place_name(db, place_handle), up = True) - else: - place = '' - - # begin event table row - trow = Html("tr") - # get event data """ for more information: see get_event_data() """ event_data = self.get_event_data(evt, evt_ref, showplc, showdescr, showsrc, shownote, subdirs, hyp) + # begin event table row + trow = Html("tr") + for (label, colclass, data) in event_data: data = data or " " @@ -2619,19 +2615,24 @@ class MediaPage(BasePage): # exif data does exists if len(image.exifKeys() ): + # initialize the dictionary for holding the image exif tags + imagetags = [] + # add exif title header - mediadetail += Html("h4", _("Image Exif Tags"), inline = True) + mediadetail += Html("h4", _("Image Exif Tags/ Keys"), inline = True) # begin exif table with Html("table", class_ = "exifdata") as table: mediadetail += table for keytag in image.exifKeys(): - trow = Html("tr") + ( - Html("td", keytag, class_ = "ColumnAttribute"), - Html("td", image[keytag], class_ = "ColumnValue") - ) - table += trow + if keytag not in imagetags: + trow = Html("tr") + ( + Html("td", keytag, class_ = "ColumnAttribute"), + Html("td", image[keytag], class_ = "ColumnValue") + ) + table += trow + imagetags.append(keytag) ##################### End of Exif Tags ##################################################### @@ -4978,7 +4979,7 @@ class NavWebReport(Report): self.place_pages(place_list, source_list) # build classes EventListPage and EventPage - # build the events list only if event pages are being created? + # build the events dictionary only if event pages are being created? if self.inc_events: event_dict = [] self.build_events(ind_list, event_dict)