aboutsummaryrefslogtreecommitdiffstats
path: root/termcast_server/termcast.py
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-10-06 14:59:37 -0400
committerJesse Luehrs <doy@tozt.net>2014-10-06 14:59:37 -0400
commite2ef15ca99a79ac02457ddf18ffbf9c5c0720ee9 (patch)
treeb8270f52e04a63c7aaf2baf2d9002e6b859c029e /termcast_server/termcast.py
parent30729ca5c0a389781d6029d0134ac508db741475 (diff)
downloadpython-termcast-server-e2ef15ca99a79ac02457ddf18ffbf9c5c0720ee9.tar.gz
python-termcast-server-e2ef15ca99a79ac02457ddf18ffbf9c5c0720ee9.zip
add foreground and background colors to the web interface
Diffstat (limited to 'termcast_server/termcast.py')
-rw-r--r--termcast_server/termcast.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/termcast_server/termcast.py b/termcast_server/termcast.py
index 28be7a0..743274b 100644
--- a/termcast_server/termcast.py
+++ b/termcast_server/termcast.py
@@ -67,11 +67,14 @@ class Handler(object):
for i in range(0, self.rows):
term.append([])
for j in range(0, self.cols):
- contents = self.vt.cell(i, j).contents()
+ cell = self.vt.cell(i, j)
+ contents = cell.contents()
if len(contents) == 0:
contents = " "
term[i].append({
"contents": contents,
+ "fgcolor": cell.fgcolor().color(),
+ "bgcolor": cell.bgcolor().color(),
})
return term