15 parser = OptionParser(prog=command_name) |
15 parser = OptionParser(prog=command_name) |
16 |
16 |
17 # define options |
17 # define options |
18 parser.add_option('-G', "--gallery-path", metavar='DIR', dest='gallery_path', default=None, |
18 parser.add_option('-G', "--gallery-path", metavar='DIR', dest='gallery_path', default=None, |
19 help="Use DIR as the Gallery path [default: CWD]") |
19 help="Use DIR as the Gallery path [default: CWD]") |
20 |
|
21 parser.add_option('-R', "--read-only", dest='read_only', action="store_true", default=False, |
|
22 help="Do not attempt to modify the gallery") |
|
23 |
20 |
24 parser.add_option('-F', "--force-update", dest='force_update', action="store_true", default=False, |
21 parser.add_option('-F', "--force-update", dest='force_update', action="store_true", default=False, |
25 help="--force-thumb + --force-html") |
22 help="--force-thumb + --force-html") |
26 |
23 |
27 parser.add_option("--force-thumb", dest='force_thumb', action="store_true", default=False, |
24 parser.add_option("--force-thumb", dest='force_thumb', action="store_true", default=False, |
48 |
45 |
49 # apply options |
46 # apply options |
50 if options.gallery_path : |
47 if options.gallery_path : |
51 config.gallery_path = options.gallery_path |
48 config.gallery_path = options.gallery_path |
52 |
49 |
53 if options.read_only : |
|
54 config.read_only = True |
|
55 |
|
56 if options.force_update : |
50 if options.force_update : |
57 config.force_html = True |
51 config.force_html = True |
58 config.force_thumb = True |
52 config.force_thumb = True |
59 |
53 |
60 if options.force_thumb : |
54 if options.force_thumb : |