gmg reprocess available --action-help now tells you processor arguments!

Every reprocessing action possible can inform you of its command line
argument stuff!  Is that awesome or what?
This commit is contained in:
Christopher Allan Webber
2013-08-09 13:56:23 -05:00
committed by Rodney Ewing
parent 85ead8ac3c
commit 55a10fef0a
3 changed files with 31 additions and 15 deletions

View File

@@ -37,6 +37,11 @@ def reprocess_parser_setup(subparser):
"id_or_type",
help="Media id or media type to check")
available_parser.add_argument(
"--action-help",
action="store_true",
help="List argument help for each action available")
############################################
# run command (TODO: and bulk_run command??)
@@ -221,13 +226,22 @@ def available(args):
processors = manager.list_eligible_processors(media_entry)
print "Available processors:"
print "---------------------"
print "====================="
for processor in processors:
if processor.description:
print " - %s: %s" % (processor.name, processor.description)
else:
print " - %s" % processor.name
if args.action_help:
for processor in processors:
print processor.name
print "-" * len(processor.name)
parser = processor.generate_parser()
parser.print_help()
else:
for processor in processors:
if processor.description:
print " - %s: %s" % (processor.name, processor.description)
else:
print " - %s" % processor.name
def run(args):