Query result as html table

This commit is contained in:
elpatron68 2019-07-27 18:37:23 +02:00
parent 9290307e21
commit 547395c268

View File

@ -370,8 +370,10 @@ class MumbleBot:
else:
logging.info('Found query parameter: ' + parameter)
stations = getstations_byname(parameter)
msg += '\n<table><tr><th>ID</th><th>Station Name</th></tr>'
for s in stations:
msg += "<br />" + s['id'] + '\t\t' + s['stationname'] + ': '
msg += '<tr><td>' + s['id'] + '</td><td>' + s['stationname'] + '</td></tr>'
msg += '</table>'
self.send_msg(msg, text)
elif command == var.config.get('command', 'help'):