X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=notmuch-to-html;h=712fbb7ee2e85637fd4d6eed2c52817554d6d5c2;hb=HEAD;hp=0d0831f3fd8a9746d388087eea5801b30a4e47b5;hpb=61819058a9f7804efddfbe596785abf7eea349db;p=obsolete%2Fnotmuch-to-html diff --git a/notmuch-to-html b/notmuch-to-html index 0d0831f..712fbb7 100755 --- a/notmuch-to-html +++ b/notmuch-to-html @@ -266,6 +266,8 @@ group.add_argument('--query', help='path to configuration 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() @@ -343,6 +345,11 @@ if args.list_views: for view in config['views']: print(view['title']) sys.exit(0) +elif args.get_query != None: + for view in config['views']: + if args.get_query == view['title']: + print(' and '.join(view['query'])) + sys.exit(0) else: # only import notmuch if needed import notmuch