Add help command and options to jack_control

This commit is contained in:
Florian Paul Schmidt 2013-05-23 21:02:21 +02:00
parent b75b629c70
commit b95372e1f0
1 changed files with 33 additions and 28 deletions

View File

@ -101,11 +101,11 @@ def get_parameters(iface, path):
print "%20s: %s (%s:%s:%s:%s)" %(name, descr, typestr, isset, default, value)
def main():
if len(sys.argv) == 1:
def print_help():
print "Usage: %s [command] [command] ..." % os.path.basename(sys.argv[0])
print "Commands:"
print " exit - exit jack dbus service (stops jack server if currently running)"
print " help - print this help text"
print " status - check whether jack server is started, return value is 0 if running and 1 otherwise"
print " start - start jack server if not currently started"
print " stop - stop jack server if currently started"
@ -130,6 +130,11 @@ def main():
print " epd <param> - get long description for engine parameter"
print " eps <param> <value> - set engine parameter"
print " epr <param> - reset engine parameter to its default value"
def main():
if len(sys.argv) == 1 or sys.argv[1] in ["-h", "--help", "help"]:
print_help()
sys.exit(0)
bus = dbus.SessionBus()