--- a/degal/config.py Fri Jun 05 19:29:04 2009 +0300
+++ b/degal/config.py Fri Jun 05 19:30:15 2009 +0300
@@ -2,6 +2,8 @@
Configuration
"""
+import render
+
class Configuration (object) :
"""
Various configuration settings
@@ -21,3 +23,34 @@
thumb_size = (160, 120)
preview_size = (640, 480)
+ # number of images displayed per folder page
+ images_per_page = 50
+
+ # exif tags used in output
+ # Copyright (C) 2008, Santtu Pajukanta <santtu@pajukanta.fi>
+ # XXX: import from dexif?
+ exif_tags = [
+ # TODO Create date is in a useless format, needs some strptime love
+ ("CreateDate", "Create date" ),
+ ("Model", "Camera model" ),
+ ("Aperture", "Aperture" ),
+ ("ExposureMode", "Exposure mode" ),
+ ("ExposureCompensation", "Exposure compensation" ),
+ ("ExposureTime", "Exposure time" ),
+ ("Flash", "Flash mode" ),
+ ("ISO", "ISO" ),
+ ("ShootingMode", "Shooting mode" ),
+ ("LensType", "Lens type" ),
+ ("FocalLength", "Focal length" )
+ ]
+
+ def is_image (self, file) :
+ """
+ Tests if the given File is an image, based on its file extension
+ """
+
+ return file.matchext(self.image_exts)
+
+ # XXX: move elsewhere?
+ def get_renderer (self) :
+ return render.RenderMachine(self)