aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/gmg_commands
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2013-08-09 13:56:23 -0500
committerRodney Ewing <ewing.rj@gmail.com>2013-08-16 15:30:15 -0700
commit55a10fef0ae97cb33c8393a7a25487c2666b4cf1 (patch)
tree90169c25ce2bfa91c33775682a3bced47ce214cf /mediagoblin/gmg_commands
parent85ead8ac3cf59aeee12ddd3b33ecfeb03c3aa946 (diff)
downloadmediagoblin-55a10fef0ae97cb33c8393a7a25487c2666b4cf1.tar.lz
mediagoblin-55a10fef0ae97cb33c8393a7a25487c2666b4cf1.tar.xz
mediagoblin-55a10fef0ae97cb33c8393a7a25487c2666b4cf1.zip
`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?
Diffstat (limited to 'mediagoblin/gmg_commands')
-rw-r--r--mediagoblin/gmg_commands/reprocess.py26
1 files changed, 20 insertions, 6 deletions
diff --git a/mediagoblin/gmg_commands/reprocess.py b/mediagoblin/gmg_commands/reprocess.py
index d6ac99ac..70163928 100644
--- a/mediagoblin/gmg_commands/reprocess.py
+++ b/mediagoblin/gmg_commands/reprocess.py
@@ -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):