From 7d7b89b52fcff24626b2006b995237336030cd04 Mon Sep 17 00:00:00 2001 From: Jim Paris Date: Mon, 12 Aug 2013 13:04:25 -0400 Subject: [PATCH] Add --no-decim option to nilmtool list --- nilmdb/cmdline/list.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nilmdb/cmdline/list.py b/nilmdb/cmdline/list.py index 49beb09..f6c46a1 100644 --- a/nilmdb/cmdline/list.py +++ b/nilmdb/cmdline/list.py @@ -45,6 +45,8 @@ def setup(self, sub): help="Show raw timestamps when printing times") group.add_argument("-l", "--layout", action="store_true", help="Show layout type next to path name") + group.add_argument("-n", "--no-decim", action="store_true", + help="Skip paths containing \"~decim-\"") return cmd @@ -71,6 +73,8 @@ def cmd_list(self): (path, layout, int_min, int_max, rows, time) = stream[:6] if not fnmatch.fnmatch(path, argpath): continue + if self.args.no_decim and "~decim-" in path: + continue if self.args.layout: printf("%s %s\n", path, layout)