~ubuntu-branches/ubuntu/utopic/lazygal/utopic

« back to all changes in this revision

Viewing changes to userscripts/lazygal-exifprint.py

  • Committer: Package Import Robot
  • Author(s): Michal Čihař
  • Date: 2012-05-14 10:26:46 UTC
  • mfrom: (1.2.10)
  • Revision ID: package-import@ubuntu.com-20120514102646-a8aqsadph5u2s2sf
Tags: 0.7.2-1
* New upstream release.
  - Fix video thumbnailing handling (Closes: #662118).
  - Fixes French translation (Closes: #664167).
* Clean generated files in clean phase (Closes: #671317).
* Bump standards to 3.9.3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/env python
2
 
 
3
 
import sys
4
 
 
5
 
from lazygal import pyexiv2api as pyexiv2
6
 
 
7
 
fn = sys.argv[1]
8
 
 
9
 
im = pyexiv2.ImageMetadata(fn.decode(sys.getfilesystemencoding()))
10
 
im.read()
11
 
 
12
 
tags = (
13
 
    'Exif.Photo.UserComment',
14
 
    'Exif.Image.ImageDescription',
15
 
    'Iptc.Application2.ObjectName',
16
 
    'Exif.Photo.DateTimeDigitized',
17
 
    'Exif.Photo.DateTimeOriginal',
18
 
    'Exif.Image.DateTime',
19
 
)
20
 
 
21
 
for tag in tags:
22
 
    try:
23
 
        val = im[tag].value
24
 
    except KeyError:
25
 
        val  = 'unset'
26
 
        pass
27
 
    print '%s: %s' % (tag, val)