Make scripts/objects lists use EvMore. Change EvMore to not justify by default.
This commit is contained in:
parent
b5aee2c41e
commit
69d85bd184
221 changed files with 2190 additions and 6810 deletions
|
|
@ -168,9 +168,7 @@ def _to_ansi(obj, regexable=False):
|
|||
# escape the |-structure twice.
|
||||
obj = _ANSI_ESCAPE.sub(r"||||", obj)
|
||||
if isinstance(obj, dict):
|
||||
return dict(
|
||||
(key, _to_ansi(value, regexable=regexable)) for key, value in obj.items()
|
||||
)
|
||||
return dict((key, _to_ansi(value, regexable=regexable)) for key, value in obj.items())
|
||||
elif is_iter(obj):
|
||||
return [_to_ansi(o) for o in obj]
|
||||
else:
|
||||
|
|
@ -210,9 +208,7 @@ class EvForm(object):
|
|||
dict((to_str(key), value) for key, value in cells.items()) if cells else {}
|
||||
)
|
||||
self.tables_mapping = (
|
||||
dict((to_str(key), value) for key, value in tables.items())
|
||||
if tables
|
||||
else {}
|
||||
dict((to_str(key), value) for key, value in tables.items()) if tables else {}
|
||||
)
|
||||
|
||||
self.cellchar = "x"
|
||||
|
|
@ -284,9 +280,7 @@ class EvForm(object):
|
|||
dy_up = 0
|
||||
if iy > 0:
|
||||
for i in range(1, iy):
|
||||
if all(
|
||||
form[iy - i][ix] == cellchar for ix in range(leftix, rightix)
|
||||
):
|
||||
if all(form[iy - i][ix] == cellchar for ix in range(leftix, rightix)):
|
||||
dy_up += 1
|
||||
else:
|
||||
break
|
||||
|
|
@ -294,9 +288,7 @@ class EvForm(object):
|
|||
dy_down = 0
|
||||
if iy < nform - 1:
|
||||
for i in range(1, nform - iy - 1):
|
||||
if all(
|
||||
form[iy + i][ix] == cellchar for ix in range(leftix, rightix)
|
||||
):
|
||||
if all(form[iy + i][ix] == cellchar for ix in range(leftix, rightix)):
|
||||
dy_down += 1
|
||||
else:
|
||||
break
|
||||
|
|
@ -338,9 +330,7 @@ class EvForm(object):
|
|||
dy_up = 0
|
||||
if iy > 0:
|
||||
for i in range(1, iy):
|
||||
if all(
|
||||
form[iy - i][ix] == tablechar for ix in range(leftix, rightix)
|
||||
):
|
||||
if all(form[iy - i][ix] == tablechar for ix in range(leftix, rightix)):
|
||||
dy_up += 1
|
||||
else:
|
||||
break
|
||||
|
|
@ -348,9 +338,7 @@ class EvForm(object):
|
|||
dy_down = 0
|
||||
if iy < nform - 1:
|
||||
for i in range(1, nform - iy - 1):
|
||||
if all(
|
||||
form[iy + i][ix] == tablechar for ix in range(leftix, rightix)
|
||||
):
|
||||
if all(form[iy + i][ix] == tablechar for ix in range(leftix, rightix)):
|
||||
dy_down += 1
|
||||
else:
|
||||
break
|
||||
|
|
@ -416,14 +404,8 @@ class EvForm(object):
|
|||
kwargs.pop("width", None)
|
||||
kwargs.pop("height", None)
|
||||
|
||||
new_cells = (
|
||||
dict((to_str(key), value) for key, value in cells.items()) if cells else {}
|
||||
)
|
||||
new_tables = (
|
||||
dict((to_str(key), value) for key, value in tables.items())
|
||||
if tables
|
||||
else {}
|
||||
)
|
||||
new_cells = dict((to_str(key), value) for key, value in cells.items()) if cells else {}
|
||||
new_tables = dict((to_str(key), value) for key, value in tables.items()) if tables else {}
|
||||
|
||||
self.cells_mapping.update(new_cells)
|
||||
self.tables_mapping.update(new_tables)
|
||||
|
|
@ -501,9 +483,7 @@ def _test():
|
|||
}
|
||||
)
|
||||
# create the EvTables
|
||||
tableA = EvTable(
|
||||
"HP", "MV", "MP", table=[["**"], ["*****"], ["***"]], border="incols"
|
||||
)
|
||||
tableA = EvTable("HP", "MV", "MP", table=[["**"], ["*****"], ["***"]], border="incols")
|
||||
tableB = EvTable(
|
||||
"Skill",
|
||||
"Value",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue