diff options
-rw-r--r-- | gold/Makefile | 1 | ||||
-rwxr-xr-x | gold/bitcoinslc/bitcoinslc.stats | 4 | ||||
-rwxr-xr-x | gold/bitcoinslc/bitcoinslc.stats.render | 7 | ||||
-rwxr-xr-x | gold/bitcoinslc/stats_text.sh | 4 | ||||
-rwxr-xr-x | gold/scoreboard/modules/available/bitcoin/gather | 3 | ||||
-rwxr-xr-x | gold/scoreboard/modules/available/bitcoin/init | 6 |
6 files changed, 21 insertions, 4 deletions
diff --git a/gold/Makefile b/gold/Makefile index 69b9119b..97ddcf71 100644 --- a/gold/Makefile +++ b/gold/Makefile @@ -2,3 +2,4 @@ install: ln -snf $$PWD/mtgox/ticker_text.sh ../bin/mtgox_ticker ln -snf $$PWD/scex/ticker_text.sh ../bin/scex_ticker ln -snf $$PWD/mooncoin/ticker_text.sh ../bin/mooncoin_ticker + ln -snf $$PWD/bitcoinslc/stats_text.sh ../bin/bitcoinslc_stats diff --git a/gold/bitcoinslc/bitcoinslc.stats b/gold/bitcoinslc/bitcoinslc.stats new file mode 100755 index 00000000..8547dbcc --- /dev/null +++ b/gold/bitcoinslc/bitcoinslc.stats @@ -0,0 +1,4 @@ +#! /bin/sh +# get mtgox ticker data +set -euf +curl -ksS https://www.bitcoins.lc/stats.json diff --git a/gold/bitcoinslc/bitcoinslc.stats.render b/gold/bitcoinslc/bitcoinslc.stats.render new file mode 100755 index 00000000..7ab26a02 --- /dev/null +++ b/gold/bitcoinslc/bitcoinslc.stats.render @@ -0,0 +1,7 @@ +#!/usr/bin/python + +import json,sys + +result = json.load(sys.stdin) + +print "Block: " + str(result["current_block"]) + " Difficulty: " + str(result["difficulty"]) diff --git a/gold/bitcoinslc/stats_text.sh b/gold/bitcoinslc/stats_text.sh new file mode 100755 index 00000000..2d146c86 --- /dev/null +++ b/gold/bitcoinslc/stats_text.sh @@ -0,0 +1,4 @@ +#! /bin/sh +set -euf +cd $(dirname `readlink -f $0`) +./bitcoinslc.stats | ./bitcoinslc.stats.render diff --git a/gold/scoreboard/modules/available/bitcoin/gather b/gold/scoreboard/modules/available/bitcoin/gather index 8b996428..22410f7b 100755 --- a/gold/scoreboard/modules/available/bitcoin/gather +++ b/gold/scoreboard/modules/available/bitcoin/gather @@ -7,6 +7,7 @@ mkdir -p $LDIR # write into live directory and archive -$BITCOIND_PATH getinfo | python $HERE/render | tee $LDIR/$LF >> $ADIR/$LF +#$BITCOIND_PATH getinfo | python $HERE/render | tee $LDIR/$LF >> $ADIR/$LF +echo `date +"%Y-%m-%dT%H:%M:%S"` `$KREBSDIR/bin/bitcoinslc_stats` | sed -e 's/Difficulty: //' -e 's/Block: //' | tee $LDIR/_${LF}>> $ADIR/${LF} echo `date +"%Y-%m-%dT%H:%M:%S"` `$KREBSDIR/bin/mtgox_ticker` | sed -e 's/High: //' -e 's/Low: //' -e 's/Last: //' | tee $LDIR/ticker_${LF}>> $ADIR/ticker_${LF} diff --git a/gold/scoreboard/modules/available/bitcoin/init b/gold/scoreboard/modules/available/bitcoin/init index cc5688bd..97b60402 100755 --- a/gold/scoreboard/modules/available/bitcoin/init +++ b/gold/scoreboard/modules/available/bitcoin/init @@ -35,9 +35,9 @@ set tmargin 2 set size 1,0.5 set origin 0.0,0.5 set key left top -plot "$ADIR/ticker_bitcoin" using 1:2 smooth bezier title "Scex High" with lines , \ - "$ADIR/ticker_bitcoin" using 1:3 smooth bezier title "Scex Low" with lines , \ - "$ADIR/ticker_bitcoin" using 1:4 smooth bezier title "Scex Last" with lines +plot "$ADIR/ticker_bitcoin" using 1:2 smooth bezier title "High" with lines , \ + "$ADIR/ticker_bitcoin" using 1:3 smooth bezier title "Low" with lines , \ + "$ADIR/ticker_bitcoin" using 1:4 smooth bezier title "Last" with lines EOF |