]> git.treefish.org Git - bitvalue.git/commitdiff
Use BTC instead of zero value/rate
authorAlexander Schmidt <alex@treefish.org>
Thu, 9 Nov 2017 18:04:59 +0000 (19:04 +0100)
committerAlexander Schmidt <alex@treefish.org>
Thu, 9 Nov 2017 18:04:59 +0000 (19:04 +0100)
bitvalue

index 4445017576083b5523a921f35d84c4b9bbe9bdd7..3f75ff2ee82bff0e30f0354a0420c61bbc41b136 100755 (executable)
--- a/bitvalue
+++ b/bitvalue
@@ -35,8 +35,7 @@ if [ ! -f $CONFIG ]; then
     cat << EOF > $CONFIG
 EXCHANGE="bitstamp"
 CURRENCY="EUR"
-ZERO_RATE="1"
-ZERO_VALUE="1"
+BTC="1"
 EOF
     echo "Created config: $CONFIG - Adapt config parameters!"
 fi
@@ -48,14 +47,14 @@ if ! ping -c 1 $HOST >/dev/null 2>&1; then
     exit 1
 fi
 
-cat << EOF | gnuplot 2>/dev/null
+cat << EOF | gnuplot
 set terminal dumb
 set datafile separator ","
 set xdata time
 set timefmt "%Y-%m-%d %H:%M:%S UTC"
-set title "EXCHANGE: $EXCHANGE | TIMESPAN: $TIMESPAN\nZERO RATE: $ZERO_RATE $CURRENCY | ZERO VALUE: $ZERO_VALUE $CURRENCY"
+set title "EXCHANGE: $EXCHANGE | TIMESPAN: $TIMESPAN\nCURRENCY: $CURRENCY | BTC: $BTC "
 plot "< wget -q -O - \"https://$HOST/export_data.csv?currency=$CURRENCY&data_type=price&exchange=$EXCHANGE&t=l&timespan=$TIMESPAN\"" \
-     using 1:(\$3/$ZERO_RATE*$ZERO_VALUE) with lines title ""
+     using 1:(\$3*$BTC) with lines title ""
 EOF
 
 if [ $? -ne 0 ]; then