Example #1
0
 def main_help_text(self,argv=None):
     """
     Returns the script's main help text, as a string.
     """
     import thepian
     prog_name = os.path.basename(argv[0])
     style = color_style()
     usage = [
         style.HEADING('%s <subcommand> [options] [args]' % prog_name),
         'Thepian command line tool, version %s' % thepian.get_version(),
         "Type '%s help <subcommand>' for help on a specific subcommand." % prog_name,
         'Available subcommands:',
     ]
     commands = self.get_commands().keys()
     commands.sort()
     return '\n'.join(usage + ['  %s' % cmd for cmd in commands])
Example #2
0
 def __init__(self):
     self.style = color_style()
Example #3
0
 def get_style(self):
     return getattr(self.cmd,'style',color_style())