X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=devel%2Fnmbug%2Fnmbug-status;h=b7c2f80ec75133cdddd983ad227f0d3608e2e832;hb=783225846849b1f9c8f7ba3b54456278a2e46bc6;hp=a7c79206621e8d21ac3305210be45eac54e902be;hpb=d1d84cab1df3e280676553b057d7c59199b382ea;p=notmuch diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status index a7c79206..b7c2f80e 100755 --- a/devel/nmbug/nmbug-status +++ b/devel/nmbug/nmbug-status @@ -19,6 +19,13 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see http://www.gnu.org/licenses/ . +"""Generate HTML for one or more notmuch searches. + +Messages matching each search are grouped by thread. Each message +that contains both a subject and message-id will have the displayed +subject link to the Gmane view of the message. +""" + from __future__ import print_function from __future__ import unicode_literals @@ -255,7 +262,7 @@ class HtmlPage (Page): def _slug(self, string): return self._slug_regexp.sub('-', string) -parser = argparse.ArgumentParser() +parser = argparse.ArgumentParser(description=__doc__) parser.add_argument('--text', help='output plain text format', action='store_true') parser.add_argument('--config', help='load config from given file', @@ -268,6 +275,14 @@ parser.add_argument('--get-query', help='get query for view', args = parser.parse_args() config = read_config(path=args.config) +context = { + 'date': datetime.datetime.utcnow(), + '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( @@ -308,22 +323,26 @@ _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', +'''.format(**context), + footer=''' +
+

Generated: {date} + + +'''.format(**context), ) if args.list_views: