Copy metadata should be enabled by default if pyexiv2 is installed

Registered by Stani on 2009-06-04

Otherwise metadata such as image orientation gets lost.

Blueprint information

Status:
Complete
Approver:
Stani
Priority:
High
Drafter:
Stani
Direction:
Approved
Assignee:
Stani
Definition:
Approved
Series goal:
Accepted for 0.2
Implementation:
Implemented
Milestone target:
milestone icon 0.2.1
Started by
Stani on 2009-06-04
Completed by
Stani on 2009-06-15

Related branches

Sprints

Whiteboard

$ bzr commit -m "enable save metadata by default if pyexiv2 is installed"
Committing to: /home/stani/sync/python/phatch/trunk/
modified phatch/app.py
modified phatch/core/settings.py
Committed revision 639.

$ bzr diff -r-2
=== modified file 'phatch/app.py'
--- phatch/app.py 2009-05-25 17:41:29 +0000
+++ phatch/app.py 2009-06-04 17:42:02 +0000
@@ -19,6 +19,7 @@
 import os, optparse, sys, urllib
 from data.info import INFO
 from core.config import load_locale
+from core.pil import exif

 VERSION = "%(name)s %(version)s"%INFO

@@ -78,7 +79,7 @@
         help = _("Specify locale language (for example en or en_GB)"))
     parser.add_option("-m", "--metadata", action="store_true",
         dest = "save_metadata",
- default = False,
+ default = bool(exif),
         help = _("Save metadata (requires exif & iptc plugin)"))
     parser.add_option("-n", "--inspect", action="store_true",
         dest = "image_inspector",

=== modified file 'phatch/core/settings.py'
--- phatch/core/settings.py 2009-06-04 10:43:17 +0000
+++ phatch/core/settings.py 2009-06-04 17:43:17 +0000
@@ -2,7 +2,6 @@
 import ct

 def create_settings(config_paths=None,options=None):
- from pil import exif
     settings = {
         'create_missing_folders' : True,
         'extensions' : IMAGE_EXTENSIONS,
@@ -11,7 +10,7 @@
         'overwrite_existing_images' : False,
         'no_save' : False,
         'check_images_first' : True,
- 'save_metadata' : bool(exif),
+ 'save_metadata' : False, #defined in app.py
         #console
         'console' : False,
         'init_fonts' : False,

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.