]> kaliko git repositories - mpd-sima.git/blobdiff - sima/utils/startopt.py
Fixed crash when setting XDG_CONFIG_HOME (closes #50)
[mpd-sima.git] / sima / utils / startopt.py
index a1824ee8ca61b31346c83cb0c77065a291cd5b14..80ccb9742e737a9e9a12bcab167b03e71e4a28ca 100644 (file)
@@ -44,6 +44,7 @@ def clean_dict(to_clean):
 CMDS = {'config-test': 'Test configuration (MPD connection and Tags plugin only)',
         'create-db': 'Create the database',
         'generate-config': 'Generate a configuration file to stdout',
+        'purge-history': 'Remove play history'
         }
 # OPTIONS LIST
 # pop out 'sw' value before creating Parser object.
@@ -59,57 +60,50 @@ OPTS = [
         'type': str,
         'dest': 'logfile',
         'action': Wfile,
+        'metavar': 'LOG',
         'help': 'file to log message to, default is stdout/stderr'},
     {
         'sw': ['-v', '--log-level'],
         'type': str,
         'dest': 'verbosity',
         'choices': ['debug', 'info', 'warning', 'error'],
-        'help': 'Log messages verbosity, default is info'},
+        'help': 'log messages verbosity, default is info'},
     {
         'sw': ['-p', '--pid'],
         'dest': 'pidfile',
         'action': Wfile,
+        'metavar': 'FILE',
         'help': 'file to save PID to, default is not to store pid'},
     {
         'sw': ['-d', '--daemon'],
         'dest': 'daemon',
         'action': 'store_true',
-        'help': 'Daemonize process.'},
+        'help': 'daemonize process'},
     {
         'sw': ['-S', '--host'],
         'dest': 'host',
-        'help': 'Host MPD in running on (IP or FQDN)'},
+        'help': 'host MPD in running on (IP or FQDN)'},
     {
         'sw': ['-P', '--port'],
         'type': int,
         'dest': 'port',
-        'help': 'Port MPD in listening on'},
+        'help': 'port MPD in listening on'},
     {
         'sw': ['-c', '--config'],
         'dest': 'conf_file',
         'action': Rfile,
-        'help': 'Configuration file to load'},
-    {  # TODO: To remove eventually in next major realese v0.18
-        'sw': ['--generate-config'],
-        'dest': 'generate_config',
-        'action': 'store_true',
-        'help': SUPPRESS},
+        'metavar': 'CONFIG',
+        'help': 'configuration file to load'},
     {
         'sw': ['--var-dir', '--var_dir'],
         'dest': 'var_dir',
         'action': Wdir,
-        'help': 'Directory to store var content (ie. database, cache)'},
-    {  # TODO: To remove eventually in next major realese v0.18
-        'sw': ['--create-db'],
-        'action': 'store_true',
-        'dest': 'create_db',
-        'help': SUPPRESS},
+        'help': 'directory to store var content (ie. database, cache)'},
     {
         'sw': ['command'],
         'nargs': '?',
         'choices': CMDS.keys(),
-        'help': 'Command to run (cf. description or unix manual for more)'},
+        'help': 'command to run (cf. description or unix manual for more)'},
 ]