def help(self, argv=('jonah',)):
"""Output the help screen"""
output = "Jonah {} -- ".format(version.__version__)
output += "USAGE:\n"
output += " {} <COMMAND>, where <COMMMAND> is one of the following:\n".format(argv[0])
commands = {"General": ['init', 'build', 'clean_build', 'cleanup', 'version'],
"Development": ['develop', 'reload', 'shell', 'stop', 'test', 'compilemessages'],
"Deployment": ['stage', 'deploy', 'tag', 'direct_deploy']}
for group_name in commands.keys():
output += "\n {}:\n".format(group_name)
for command_name in commands[group_name]:
command_help = textwrap.wrap(getattr(self, command_name).__doc__, 56)
output += " - {}\t{}\n".format(command_name.ljust(12), command_help[0])
if len(command_help) > 1:
for additional_line in command_help[1:]:
output += (" " * 20) + "\t" + additional_line + "\n"
return output
# Helper Methods ###################################################################################################
评论列表
文章目录