any encoding available...
This commit is contained in:
@@ -16,13 +16,7 @@ def setup_options():
|
|||||||
type = str,
|
type = str,
|
||||||
default = "cp437",
|
default = "cp437",
|
||||||
nargs = '?',
|
nargs = '?',
|
||||||
choices = [
|
help = "Character set to show, ex. ascii, cp437, cp850, cp1250, latin1 ..."
|
||||||
"ascii",
|
|
||||||
"cp437",
|
|
||||||
"cp850",
|
|
||||||
"cp1250",
|
|
||||||
"latin1",
|
|
||||||
]
|
|
||||||
)
|
)
|
||||||
opts=parser.parse_args()
|
opts=parser.parse_args()
|
||||||
return opts
|
return opts
|
||||||
@@ -65,7 +59,8 @@ if __name__ == "__main__":
|
|||||||
table.pop(0)
|
table.pop(0)
|
||||||
bc = ansi.code()
|
bc = ansi.code()
|
||||||
bc.clear()
|
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:
|
if opts.v:
|
||||||
long_format(table)
|
long_format(table)
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user