X-Git-Url: http://rtime.felk.cvut.cz/gitweb/notmuch.git/blobdiff_plain/b5bdf5f4a83357efd874140f21cef27ef744bea2..7f2bbe93a557c22277b46ad6048742222d80ed68:/devel/nmbug/nmbug-status diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status index e137a90e..f0809f19 100755 --- a/devel/nmbug/nmbug-status +++ b/devel/nmbug/nmbug-status @@ -276,9 +276,7 @@ args = parser.parse_args() config = read_config(path=args.config) -_PAGES['text'] = Page() -_PAGES['html'] = HtmlPage( - header=''' +header_template = config['meta'].get('header', ''' @@ -315,22 +313,43 @@ _PAGES['html'] = HtmlPage( tbody:nth-child(4n+3) tr td {{ background-color: #bce; }} + hr {{ + border: 0; + height: 1px; + color: #ccc; + background-color: #ccc; + }}

{title}

-

-Generated: {date}
{blurb}

Views

-'''.format(date=datetime.datetime.utcnow().date(), - title=config['meta']['title'], - blurb=config['meta']['blurb'], - encoding=_ENCODING, - inter_message_padding='0.25em', - border_radius='0.5em'), - footer='\n\n', +''') + +footer_template = config['meta'].get('footer', ''' +
+

Generated: {datetime} + + +''') + +now = datetime.datetime.utcnow() +context = { + 'date': now, + 'datetime': now.strftime('%Y-%m-%d %H:%M:%SZ'), + 'title': config['meta']['title'], + 'blurb': config['meta']['blurb'], + 'encoding': _ENCODING, + 'inter_message_padding': '0.25em', + 'border_radius': '0.5em', + } + +_PAGES['text'] = Page() +_PAGES['html'] = HtmlPage( + header=header_template.format(**context), + footer=footer_template.format(**context), ) if args.list_views: