equal
deleted
inserted
replaced
1 """ |
1 """ |
2 Main entry point for the command-line interface |
2 Main entry point for the command-line interface |
3 """ |
3 """ |
4 |
4 |
5 import gallery, commands, config |
5 import gallery, commands, config, version |
6 |
6 |
7 from optparse import OptionParser |
7 from optparse import OptionParser |
8 import os.path |
8 import os.path |
9 |
9 |
10 def build_config () : |
10 def build_config () : |
17 def option_parser (exec_name) : |
17 def option_parser (exec_name) : |
18 """ |
18 """ |
19 Build the OptionParser that we use |
19 Build the OptionParser that we use |
20 """ |
20 """ |
21 |
21 |
22 parser = OptionParser(prog=exec_name, description="Degal - A photo gallery", version="???") |
22 parser = OptionParser(prog=exec_name, description="Degal - A photo gallery", version="Degal %s" % version.VERSION_STRING) |
23 |
23 |
24 parser.add_option('-C', "--config", metavar='PATH', dest="_load_config_path", |
24 parser.add_option('-C', "--config", metavar='PATH', dest="_load_config_path", |
25 help="Load configuration from PATH") |
25 help="Load configuration from PATH") |
26 |
26 |
27 parser.add_option('-H', "--gallery-path", metavar='DIR', |
27 parser.add_option('-H', "--gallery-path", metavar='DIR', |