mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-26 04:45:20 +01:00
nmbug-status: Consolidate HTML header printing
Make this all one big string, using '...{date}...'.format(date=...) to inject the date [1]. This syntax was added in Python 2.6, and is preferred to %-formatting in Python 3 [1]. [1]: http://docs.python.org/2/library/stdtypes.html#str.format
This commit is contained in:
parent
a7e4d9a18f
commit
a6ff03df3f
1 changed files with 6 additions and 7 deletions
|
@ -190,13 +190,12 @@ if output_format == 'html':
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<title>Notmuch Patches</title>
|
<title>Notmuch Patches</title>
|
||||||
</head>
|
</head>
|
||||||
<body>''')
|
<body>
|
||||||
print('<h2>Notmuch Patches</h2>')
|
<h2>Notmuch Patches</h2>
|
||||||
print('Generated: %s<br />' % datetime.datetime.utcnow().date())
|
Generated: {date}<br />
|
||||||
print('For more infomation see <a href="http://notmuchmail.org/nmbug">nmbug</a>')
|
For more infomation see <a href="http://notmuchmail.org/nmbug">nmbug</a>
|
||||||
|
<h3>Views</h3>
|
||||||
print('<h3>Views</h3>')
|
<ul>'''.format(date=datetime.datetime.utcnow().date()))
|
||||||
print('<ul>')
|
|
||||||
for view in config['views']:
|
for view in config['views']:
|
||||||
print('<li><a href="#%(title)s">%(title)s</a></li>' % view)
|
print('<li><a href="#%(title)s">%(title)s</a></li>' % view)
|
||||||
print('</ul>')
|
print('</ul>')
|
||||||
|
|
Loading…
Reference in a new issue