diff options
| author | Mattias Andrée <maandree@operamail.com> | 2013-05-13 08:06:35 +0200 |
|---|---|---|
| committer | Mattias Andrée <maandree@operamail.com> | 2013-05-13 08:06:35 +0200 |
| commit | ebba333bdb4db2f0ff05a21e7a85a2c3c9c5b34b (patch) | |
| tree | ee71a176576c666c82479cf67cfe43a6f723b82d /src | |
| parent | add parsing (diff) | |
| download | splashtool-ebba333bdb4db2f0ff05a21e7a85a2c3c9c5b34b.tar.gz splashtool-ebba333bdb4db2f0ff05a21e7a85a2c3c9c5b34b.tar.bz2 splashtool-ebba333bdb4db2f0ff05a21e7a85a2c3c9c5b34b.tar.xz | |
output fix
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src')
| -rwxr-xr-x | src/parse.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/parse.py b/src/parse.py index 52af7de..698bde9 100755 --- a/src/parse.py +++ b/src/parse.py @@ -123,15 +123,16 @@ title = '\033' + colour_title + '\033' + title + '\033\033' helpmsgendrow -= vshift helptext = (helptext + '\n' * (helpmsgendrow - helpmsgrow)).split('\n')[: helpmsgendrow - helpmsgrow + 1] -helptext = ['\033' + colour_help + '\033' + (x + ' ' * 86)[:86] + '\033\033' for x in helptext] +helptext = ['\033' + colour_help + '\033' + (' ' * margin + x + ' ' * 86)[:86] + '\033\033' for x in helptext] helptext = '\n'.join(helptext) -text = '\n' * vshift + ' ' * margin + '\033' + border + '\033┌' + '─' * width + '┐\033\033\n' -text += ' ' * margin + '\033' + border + '\033│\033\033' + title + '\033' + border + '\033│\033\033\n' -text += ' ' * margin + '\033' + border + '\033├' + '─' * width + '┤\033\033\n' +menumargin = (86 - width) // 2 +text = '\n' * vshift + ' ' * menumargin + '\033' + border + '\033┌' + '─' * width + '┐\033\033\n' +text += ' ' * menumargin + '\033' + border + '\033│\033\033' + title + '\033' + border + '\033│\033\033\n' +text += ' ' * menumargin + '\033' + border + '\033├' + '─' * width + '┤\033\033\n' for label in labels: - text += ' ' * margin + '\033' + border + '\033│\033\033' + label + '\033' + border + '\033│\033\033\n' -text += ' ' * margin + '\033' + border + '\033└' + '─' * width + '┘\033\033\n' + text += ' ' * menumargin + '\033' + border + '\033│\033\033' + label + '\033' + border + '\033│\033\033\n' +text += ' ' * menumargin + '\033' + border + '\033└' + '─' * width + '┘\033\033\n' more = [] |
