Skip to content
This repository has been archived by the owner on Mar 15, 2021. It is now read-only.

Commit

Permalink
help format adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
brifordwylie committed Aug 4, 2014
1 parent ecf4276 commit e233ddc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions workbench/server/workbench_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -558,8 +558,8 @@ def _help_commands(self):
help = 'Workbench Commands:'
for command in self.list_all_commands():
full_help = self.work_request('help_cli', command)['help_cli']['help']
compact_help = full_help.split('\n')[:3]
help += '\n\t%s' % '\n'.join(compact_help)
compact_help = full_help.split('\n')[:2]
help += '\n\n%s' % '\n'.join(compact_help)
return help

def _help_workers(self):
Expand All @@ -568,7 +568,7 @@ def _help_workers(self):
for worker in self.list_all_workers():
full_help = self.work_request('help_cli', worker)['help_cli']['help']
compact_help = full_help.split('\n')[:4]
help += '\n\t%s' % '\n'.join(compact_help)
help += '\n\n%s' % '\n'.join(compact_help)
return help


Expand Down
6 changes: 3 additions & 3 deletions workbench/workers/help_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ def execute(self, input_data):
# Worker
elif type_tag == 'worker':
output = '%s%s%s%s' % (Style.BRIGHT, Fore.YELLOW, input_data['name'], Style.RESET_ALL)
output += '\n %sInput: %s%s%s' % (Fore.BLUE, Fore.GREEN, input_data['dependencies'], Fore.RESET)
output += '\n%s%s' % (Fore.GREEN, input_data['docstring'])
output += '\n %sInput: %s%s%s' % (Fore.BLUE, Fore.GREEN, input_data['dependencies'], Fore.RESET)
output += '\n %s%s' % (Fore.GREEN, input_data['docstring'])

# Command
elif type_tag == 'command':
output = '%s%s%s%s%s%s' % (Style.BRIGHT, Fore.YELLOW, input_data['command'],
Style.RESET_ALL, Fore.BLUE, input_data['sig'])
output += '%s\n%s%s' % (Fore.GREEN, input_data['docstring'], Fore.RESET)
output += '\n %s%s%s' % (Fore.GREEN, input_data['docstring'], Fore.RESET)

# WTF: Alert on unknown type_tag and return a string of the input_data
else:
Expand Down

0 comments on commit e233ddc

Please sign in to comment.