any encoding available...

This commit is contained in:
ville rantanen
2018-10-22 22:06:29 +03:00
parent e57a378670
commit 9e98da2e39

View File

@@ -16,13 +16,7 @@ def setup_options():
type = str,
default = "cp437",
nargs = '?',
choices = [
"ascii",
"cp437",
"cp850",
"cp1250",
"latin1",
]
help = "Character set to show, ex. ascii, cp437, cp850, cp1250, latin1 ..."
)
opts=parser.parse_args()
return opts
@@ -65,7 +59,8 @@ if __name__ == "__main__":
table.pop(0)
bc = ansi.code()
bc.clear()
print(bc.color_string("="*20 + " ${Y}%s${Z} "%( opts.cs, ) + "="*20))
lines = int(32 - len(opts.cs)/2 - 2)
print(bc.color_string("="*lines + " ${Y}%s${Z} "%( opts.cs, ) + "="*lines))
if opts.v:
long_format(table)
else: