eggification
[Photo.git] / Products / Photo / standards / bridges / _bridges.py
diff --git a/Products/Photo/standards/bridges/_bridges.py b/Products/Photo/standards/bridges/_bridges.py
new file mode 100755 (executable)
index 0000000..b637a82
--- /dev/null
@@ -0,0 +1,16 @@
+from os.path import join
+from Globals import package_home
+home = package_home(globals())
+
+f = file(join(home, 'xmp_exif.csv'))
+lines = f.readlines()
+f.close()
+xmp2exif = {}
+exif2xmp = {}
+
+for l in [l for l in lines if not l.startswith('#')] :
+       fields = [f.strip() for f in l.split(';')]
+       assert len(fields) == 2, "%s malformed at line: '%s')" % (path, l)
+       xmpName, exifTag = fields
+       xmp2exif[xmpName] = exifTag
+       exif2xmp[exifTag] = xmpName