--- a/templates/results.html Mon Aug 24 01:24:08 2015 +0800
+++ b/templates/results.html Sun Sep 27 02:55:48 2015 +0800
<td>{{ 'M' if len(cset['parents']) > 1 else '' }}</td>
<td>{{ cset['branch'] }}</td>
<td>{{ ', '.join(cset['tags']) }}</td>
- <td title="{{ cset['user'] }}">{{ cset['user'].partition(' <')[0] }}</td>
+ <td title="{{ showuser(cset['user']) }}">{{ showuser(cset['user'], short=True) }}</td>
<td class="hint"><div title="{{ cset['desc'] }}">{{ cset['desc'].partition('\n')[0] }}</div></td>
{% set result = results.get(cset['node'], {}) %}
--- a/viewer.py Mon Aug 24 01:24:08 2015 +0800
+++ b/viewer.py Sun Sep 27 02:55:48 2015 +0800
return json.loads(output)
+def showuser(user, short=False, domainre=re.compile(r'@[^ >]+')):
+ user = domainre.sub('@...', user)
+ return user.partition(' <')[0]
class BaseHandler(RequestHandler):
self.conn = sqlite3.connect(DBPATH)
'setlocal': self.setlocal,
- 'setmarks': self.setmarks(marks)
+ 'setmarks': self.setmarks(marks),
self.render('results.html', **context)