X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=devel%2Fnmbug%2Fnmbug-status;h=f0809f193e108fb024982524a2a56ec1c3250173;hb=567aab405b05d9ef79ddf1b62302806b9ddbeaad;hp=e137a90ed07582dd0afe6af66aa984c3bbf7724f;hpb=b5bdf5f4a83357efd874140f21cef27ef744bea2;p=notmuch 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: