!752 static O mainBot; static S talkPageID = "#1002123"; static int maxQuestionLength = 500; static int maxAnswerLength = 200; static S html(S subUri, Map params) { S id = params.get("id"); S slogan = params.get("slogan"); S sloganStyle = params.get("sloganStyle"); S bottomLink = params.get("bottomLink"); S imgLink = "http://tinybrain.de/"; if (id == null) ret "please specify id"; S imgURL = snippetImageURL(id); new StringBuilder buf; buf.append("" + slogan + "\n" + "
"); buf.append(""); if (!empty(slogan)) { buf.append("


"); buf.append("" + slogan + ""); int i = l((L) get(mainBot, "bots")); int n = l((L) get(mainBot, "botIDs")); buf.append("

" + "" + i + "/" + n + " bots ready to talk. TALK TO ELEUTHERIA HERE."); L history = cast get(mainBot, "history"); if (!empty(history)) pcall { buf.append("


Last dialogs:

"); int x = max(l(history)-5, 0); for (i = x; i < l(history); i++) { O dialog = history.get(i); S q = shorten(getString(dialog, "question"), maxQuestionLength); S a = shorten(getString(dialog, "answer"), maxAnswerLength); buf.append("User: " + htmlencode(q) + "
\n"); buf.append("Eleutheria: " + htmlencode(a) + "
\n"); } } buf.append("

"); //buf.append("Join our community!"); buf.append([[
]]); buf.append("

"); buf.append("Bot list."); } if (!empty(bottomLink)) buf.append("
" + bottomLink); buf.append("
\n" + ""); ret str(buf); }