X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=devel%2Fnmbug%2Fnmbug-status;h=f0809f193e108fb024982524a2a56ec1c3250173;hp=c0bdd1b6e7722936cf02df7b7a1985f064c03051;hb=7f2bbe93a557c22277b46ad6048742222d80ed68;hpb=f10024f30dc907d4396fb7ef3cc8541c89e31715 diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status index c0bdd1b6..f0809f19 100755 --- a/devel/nmbug/nmbug-status +++ b/devel/nmbug/nmbug-status @@ -275,20 +275,8 @@ parser.add_argument('--get-query', help='get query for view', args = parser.parse_args() config = read_config(path=args.config) -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 = config['meta'].get('header', ''' @@ -338,13 +326,30 @@ _PAGES['html'] = HtmlPage( {blurb}

Views

-'''.format(**context), - footer=''' +''') + +footer_template = config['meta'].get('footer', '''

Generated: {datetime} -'''.format(**context), +''') + +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: