Implementation of "Rename exif tag action"
Bug #386707 reported by
Juho Vepsäläinen
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Phatch |
Fix Released
|
Undecided
|
Juho Vepsäläinen |
Bug Description
This patch implements https:/
Changed in phatch: | |
milestone: | none → 0.2.1 |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I only did some small changes. You forgot a corner case where old_name == new_name, as than it would delete the tag. No icon needed here, as it is the same as the rename action. So this one is ready ;-) Congratulations!
$ bzr diff actions/ rename_ tag.py' actions/ rename_ tag.py 2009-06-15 15:04:39 +0000 actions/ rename_ tag.py 2009-06-15 15:05:14 +0000
=== modified file 'phatch/
--- phatch/
+++ phatch/
@@ -34,20 +34,20 @@
valid_last = True
def interface( self,fields) :
' Exif.Image. Software' ,choices= self.EXIF_ IPTC)
' Exif.Image. Software' ,choices= self.EXIF_ IPTC)
- fields[_t('Tag (Exif, Iptc)')]= self.ExifItpcField(
+ fields[_t('From (Exif, Iptc)')]= self.ExifItpcField(
- fields[_t('Tag (Exif, Iptc) New Name')] = self.ExifItpcField(
+ fields[_t('To (Exif, Iptc)')] = self.ExifItpcField(
def apply(self, photo,setting, cache): info()# read only field(' From (Exif, Iptc)', info)
info = photo.get_
- old_name = self.get_field('Tag (Exif, Iptc)', info)
- new_name = self.get_field('Tag (Exif, Iptc) New Name', info)
+ old_name = self.get_
+ new_name = self.get_field('To (Exif, Iptc)', info)
if new_name.strip() == '':
return photo
- if old_name in photo.info.keys():
photo. metadata[ new_name] = photo.info[ old_name]
photo. info[old_ name] = None
+ if old_name in photo.info.keys() and old_name != new_name: