X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=devel%2Fnmbug%2Fnmbug-status;h=03621bd534491b185db4dbbc63e4ad38b52b6d14;hb=d53f759456608005de929dde4b7692f54b9e05bf;hp=ef7169a6f4cb642f54155b9d0682794606df6cf9;hpb=957fc2e1a7d00636c7eaaf487edae65e7a63dc8f;p=notmuch diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status index ef7169a6..03621bd5 100755 --- a/devel/nmbug/nmbug-status +++ b/devel/nmbug/nmbug-status @@ -41,7 +41,7 @@ if not hasattr(collections, 'OrderedDict'): # Python 2.6 or earlier super(_OrderedDict, self).__setitem__(key, value) self._keys.append(key) - def __values__(self): + def values(self): for key in self._keys: yield self[key] @@ -242,6 +242,19 @@ class HtmlPage (Page): def _slug(self, string): return self._slug_regexp.sub('-', string) +parser = argparse.ArgumentParser() +parser.add_argument('--text', help='output plain text format', + action='store_true') +parser.add_argument('--config', help='load config from given file', + metavar='PATH') +parser.add_argument('--list-views', help='list views', + action='store_true') +parser.add_argument('--get-query', help='get query for view', + metavar='VIEW') + +args = parser.parse_args() + +config = read_config(path=args.config) _PAGES['text'] = Page() _PAGES['html'] = HtmlPage( @@ -249,7 +262,7 @@ _PAGES['html'] = HtmlPage( - Notmuch Patches + {title} -

Notmuch Patches

+

{title}

Generated: {date}
-For more infomation see nmbug +{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', ) - -parser = argparse.ArgumentParser() -parser.add_argument('--text', help='output plain text format', - action='store_true') -parser.add_argument('--config', help='load config from given file', - metavar='PATH') -parser.add_argument('--list-views', help='list views', - action='store_true') -parser.add_argument('--get-query', help='get query for view', - metavar='VIEW') - -args = parser.parse_args() - -config = read_config(path=args.config) - if args.list_views: for view in config['views']: print(view['title'])