summaryrefslogtreecommitdiffstats
path: root/gold/bitcoinslc
diff options
context:
space:
mode:
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