fix script to autogenerate doc
@@ -30,14 +30,15 @@ def click_get_commands(name, command):
def generate_help(commands, fh):
- for command in commands:
+ for command in sorted(commands):
command_args = command.split(' ')
command_args.append('--help')
- h = subprocess.check_output(command_args)
+ command_helper = subprocess.check_output(command_args)
+ command_helper = command_helper.decode('utf-8')
fh.write(f"# Command {command}\n\n")
fh.write("```bash\n")
- fh.write(h.decode('utf-8'))
+ fh.write(command_helper)
fh.write("```\n\n")
