Browse Source

Add --no-decim option to nilmtool list

tags/nilmdb-1.9.6^0
Jim Paris 10 years ago
parent
commit
7d7b89b52f
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      nilmdb/cmdline/list.py

+ 4
- 0
nilmdb/cmdline/list.py View File

@@ -45,6 +45,8 @@ def setup(self, sub):
help="Show raw timestamps when printing times") help="Show raw timestamps when printing times")
group.add_argument("-l", "--layout", action="store_true", group.add_argument("-l", "--layout", action="store_true",
help="Show layout type next to path name") help="Show layout type next to path name")
group.add_argument("-n", "--no-decim", action="store_true",
help="Skip paths containing \"~decim-\"")


return cmd return cmd


@@ -71,6 +73,8 @@ def cmd_list(self):
(path, layout, int_min, int_max, rows, time) = stream[:6] (path, layout, int_min, int_max, rows, time) = stream[:6]
if not fnmatch.fnmatch(path, argpath): if not fnmatch.fnmatch(path, argpath):
continue continue
if self.args.no_decim and "~decim-" in path:
continue


if self.args.layout: if self.args.layout:
printf("%s %s\n", path, layout) printf("%s %s\n", path, layout)


Loading…
Cancel
Save