equal
deleted
inserted
replaced
1 """ |
1 """ |
2 Configuration |
2 Configuration |
3 """ |
3 """ |
|
4 |
|
5 import logging |
4 |
6 |
5 class Configuration (object) : |
7 class Configuration (object) : |
6 """ |
8 """ |
7 Various configuration settings |
9 Various configuration settings |
8 """ |
10 """ |
|
11 ## runtime settings |
|
12 |
|
13 # do not modify anything |
|
14 read_only = False |
9 |
15 |
10 # the path to the gallery |
16 # the path to the gallery |
11 gallery_path = "." |
17 gallery_path = "." |
12 |
18 |
|
19 # minimum logging level |
|
20 log_level = logging.INFO |
|
21 |
|
22 ## detailed configuration |
13 # the name of the gallery |
23 # the name of the gallery |
14 gallery_title = "Image Gallery" |
24 gallery_title = "Image Gallery" |
15 |
25 |
16 # recognized image extensions |
26 # recognized image extensions |
17 image_exts = ('jpg', 'jpeg', 'png', 'gif', 'bmp') |
27 image_exts = ('jpg', 'jpeg', 'png', 'gif', 'bmp') |
43 ("ShootingMode", "Shooting mode" ), |
53 ("ShootingMode", "Shooting mode" ), |
44 ("LensType", "Lens type" ), |
54 ("LensType", "Lens type" ), |
45 ("FocalLength", "Focal length" ) |
55 ("FocalLength", "Focal length" ) |
46 ] |
56 ] |
47 |
57 |
48 ## runtime settings |
|
49 |
|
50 # do not modify anything |
|
51 read_only = False |
|
52 |
|
53 |
58 |
54 ### functions |
59 ### functions |
55 def is_image (self, file) : |
60 def is_image (self, file) : |
56 """ |
61 """ |
57 Tests if the given File is an image, based on its file extension |
62 Tests if the given File is an image, based on its file extension |