From b3566e1dc768c883e7ac41ba00b0f93f17e55bc0 Mon Sep 17 00:00:00 2001 From: Gabriel Saldana Date: Mon, 4 Mar 2013 23:19:22 -0600 Subject: [PATCH] Changes to display all EXIF information --- mediagoblin/db/mixin.py | 8 +++----- mediagoblin/tools/exif.py | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/mediagoblin/db/mixin.py b/mediagoblin/db/mixin.py index 388bac89..a0eeff61 100644 --- a/mediagoblin/db/mixin.py +++ b/mediagoblin/db/mixin.py @@ -229,15 +229,13 @@ class MediaEntryMixin(GenerateSlugMixin): return licenses.get_license_by_url(self.license or "") def exif_display_iter(self): - from mediagoblin.tools.exif import USEFUL_TAGS - if not self.media_data: return exif_all = self.media_data.get("exif_all") - for key in USEFUL_TAGS: - if key in exif_all: - yield key, exif_all[key] + for key in exif_all: + label = re.sub('(.)([A-Z][a-z]+)', r'\1 \2', key) + yield label.replace('EXIF', '').replace('Image', ''), exif_all[key] class MediaCommentMixin(object): diff --git a/mediagoblin/tools/exif.py b/mediagoblin/tools/exif.py index d0f9d0a6..6b3639e8 100644 --- a/mediagoblin/tools/exif.py +++ b/mediagoblin/tools/exif.py @@ -134,7 +134,7 @@ def _ratio_to_list(ratio): def get_useful(tags): - return dict((key, tag) for (key, tag) in tags.iteritems() if key in USEFUL_TAGS) + return dict((key, tag) for (key, tag) in tags.iteritems()) def get_gps_data(tags): -- 2.25.1