add support for lists
This commit is contained in:
parent
922192ebfe
commit
a071793d3c
14
uml.py
14
uml.py
|
@ -88,6 +88,7 @@ def renderer(chain):
|
||||||
buf += i
|
buf += i
|
||||||
print(buf)
|
print(buf)
|
||||||
elif i.element == "t":
|
elif i.element == "t":
|
||||||
|
rendered = True
|
||||||
buf = [0] * len(i.data.data[0])
|
buf = [0] * len(i.data.data[0])
|
||||||
for j in i.data.data:
|
for j in i.data.data:
|
||||||
c = 0
|
c = 0
|
||||||
|
@ -110,6 +111,19 @@ def renderer(chain):
|
||||||
cbuf = "| " + ' | '.join(j) + " |"
|
cbuf = "| " + ' | '.join(j) + " |"
|
||||||
print(cbuf)
|
print(cbuf)
|
||||||
print("+" + "-" * width + "+")
|
print("+" + "-" * width + "+")
|
||||||
|
elif i.element == "l":
|
||||||
|
rendered = True
|
||||||
|
buf = i.data.split(' ')
|
||||||
|
cbuf = "* "
|
||||||
|
for i in buf:
|
||||||
|
if (len(cbuf) + len(i) + 1) <= 63:
|
||||||
|
if not len(cbuf) == 2: cbuf += " "
|
||||||
|
cbuf += i
|
||||||
|
else:
|
||||||
|
print(cbuf)
|
||||||
|
cbuf = " "
|
||||||
|
cbuf += i
|
||||||
|
print(cbuf)
|
||||||
if rendered: print()
|
if rendered: print()
|
||||||
|
|
||||||
chain = []
|
chain = []
|
||||||
|
|
Loading…
Reference in New Issue