Browse Source

Fix sys.argv stuff; remove outdated shell scripts

tags/nilmtools-1.0
Jim Paris 11 years ago
parent
commit
101b701882
4 changed files with 2 additions and 23 deletions
  1. +0
    -13
      scripts/copy-wildcard.sh
  2. +0
    -8
      scripts/decimate-it.sh
  3. +1
    -1
      src/filter.py
  4. +1
    -1
      src/insert.py

+ 0
- 13
scripts/copy-wildcard.sh View File

@@ -1,13 +0,0 @@
#!/bin/bash

# example: ./copy-wildcard.sh http://src:12380 http://dest:12380 /path/*

if [ $# != 3 ] ; then
echo "usage: $0 src-url dest-url path-wildcard"
exit 1
fi

set -e
nilmtool -u "$1" list "$3" | sort | while read path layout; do
nilm-copy -u "$1" -U "$2" "$path" "$path"
done

+ 0
- 8
scripts/decimate-it.sh View File

@@ -1,8 +0,0 @@
#!/bin/bash

# example: ./decimate-it.sh 1 2 3 4 5 6 7 8 9 10 11 12

for i in "$@"; do
nilmtool create /lees-compressor/no-leak/raw/$((4**$i)) float32_18
/usr/bin/time -v nilm-decimate /lees-compressor/no-leak/raw/$((4**($i-1))) /lees-compressor/no-leak/raw/$((4**$i))
done

+ 1
- 1
src/filter.py View File

@@ -115,7 +115,7 @@ class Filter(object):
timestamp_to_human(interval.end))

def parse_args(self, argv = None):
args = self._parser.parse_args(argv or sys.argv)
args = self._parser.parse_args(argv)

if args.dest_url is None:
args.dest_url = args.url


+ 1
- 1
src/insert.py View File

@@ -44,7 +44,7 @@ def parse_args(argv = None):
parser.add_argument("infile", type=argparse.FileType('r'), nargs='*',
default=[sys.stdin],
help="Input files (default: stdin)")
args = parser.parse_args(argv or sys.argv)
args = parser.parse_args(argv)

printf("Stream path: %s\n", args.path)
printf(" Data rate: %s Hz\n", repr(args.rate))


Loading…
Cancel
Save