X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=devel%2Fnmbug%2Fnmbug-status;h=f0809f193e108fb024982524a2a56ec1c3250173;hb=567aab405b05d9ef79ddf1b62302806b9ddbeaad;hp=c92d268caf2972eb68779a641eaec9b3c49cb702;hpb=b70386a4cbeb1cd74ea4d54ee14f8bf22954e671;p=notmuch diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status index c92d268c..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', ''' @@ -328,17 +326,30 @@ _PAGES['html'] = HtmlPage( {blurb}

Views

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

Generated: {date} +

Generated: {datetime} -'''.format(date=datetime.datetime.utcnow().date()) +''') + +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: