Skip to content

Commit

Permalink
adding an option to vol.py to display supported output options for pl…
Browse files Browse the repository at this point in the history
…ugins
  • Loading branch information
gleeda committed May 21, 2014
1 parent 7c392f1 commit 97ca49f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion vol.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,19 @@ def list_plugins():
return result

def command_help(command):
outputs = []
for item in dir(command):
if item.startswith("render_"):
outputs.append(item.split("render_", 1)[-1])
outputopts = "\nModule Output Options: " + \
"{0}\n".format("{0}".format("\n".join([", ".join(o for o in sorted(outputs))])))

result = textwrap.dedent("""
---------------------------------
Module {0}
---------------------------------\n""".format(command.__class__.__name__))

return result + command.help() + "\n\n"
return outputopts + result + command.help() + "\n\n"

def print_info():
""" Returns the results """
Expand Down

0 comments on commit 97ca49f

Please sign in to comment.