aboutsummaryrefslogtreecommitdiffstats
path: root/src/pyexiv2.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/pyexiv2.py')
-rw-r--r--src/pyexiv2.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/pyexiv2.py b/src/pyexiv2.py
index 1cf7eb5..2a1d6ba 100644
--- a/src/pyexiv2.py
+++ b/src/pyexiv2.py
@@ -1550,3 +1550,21 @@ class ImageMetadata(object):
except AttributeError:
raise KeyError(key)
+
+if __name__ == '__main__':
+ import sys
+ args = sys.argv
+
+ if len(args) != 2:
+ print 'Usage: %s image_file' % args[0]
+ sys.exit(-1)
+
+ metadata = ImageMetadata(args[1])
+ metadata.read()
+
+ for key in metadata.exif_keys:
+ tag = metadata[key]
+ print '%-45s%-11s%s' % (key, tag.type, str(tag))
+
+ # TODO: print IPTC and XMP tags.
+