Skip to content

Commit

Permalink
make max count configureable and add info to help
Browse files Browse the repository at this point in the history
  • Loading branch information
jasoncalabrese committed Sep 10, 2016
1 parent 5c91c2d commit a2c3dc8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions bin/nightscout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,14 @@ openaps use ns shell upload treatments.json recently/combined-treatments.json
search query for Nightscout.
oref0_glucose_without_zone [args] Like oref0_glucose but without
rezoning.
oref0_glucose_since expr [tz] Get records matching oref0
oref0_glucose_since expr [tz] [count] Get records matching oref0
requirements filtered by a date calculated by expr
from Nightscout.
expr is used with date -d, for example -6hours.
tz should be the name of the
timezones device (default with
no args is tz).
expr is used with date -d, for example -6hours.
count is the max count (needed to overide NS default of 10).
upload endpoint file Upload a file to the Nightscout endpoint.
latest-treatment-time - get latest treatment time from Nightscout
format-recent-history-treatments history model - Formats medtronic pump
Expand Down Expand Up @@ -266,7 +267,8 @@ ns)
oref0_glucose_since)
expr=$1
zone=${2-'tz'}
exec ns-get host $NIGHTSCOUT_HOST entries/sgv.json "find[date][\$gte]=$(date -d $expr +"%s%3N")&count=5000" \
count=${3-1000}
exec ns-get host $NIGHTSCOUT_HOST entries/sgv.json "find[date][\$gte]=$(date -d $expr +"%s%3N")&count=$count" \
| json -e "this.glucose = this.sgv" \
| openaps use $zone rezone --astimezone --date dateString -
;;
Expand Down

0 comments on commit a2c3dc8

Please sign in to comment.