summaryrefslogtreecommitdiffstats
path: root/gold/bitcoinslc
diff options
context:
space:
mode:
authorEUcancER <root@euer.krebsco.de>2011-09-05 01:43:17 +0200
committerEUcancER <root@euer.krebsco.de>2011-09-05 01:43:17 +0200
commit19289a7161d0f2cf2e210bdfe4cd702f6d71928c (patch)
treed50dc7678d41bfc309155fe6547848424d66d7a4 /gold/bitcoinslc
parent2b4fa0c5c5712096fb16df68f44af3a2954905a4 (diff)
using external stats provider instead of running own bitcoind
this reduces the necessary maintenance overhead for bitcoind where i had some issues with overly sized databases on a small hdd bitcoinslc now provides the intel i am looking for: Difficulty and Current Block scoreboard -> bitcoin uses the new stats provider
Diffstat (limited to 'gold/bitcoinslc')
-rwxr-xr-xgold/bitcoinslc/bitcoinslc.stats4
-rwxr-xr-xgold/bitcoinslc/bitcoinslc.stats.render7
-rwxr-xr-xgold/bitcoinslc/stats_text.sh4
3 files changed, 15 insertions, 0 deletions
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