summaryrefslogtreecommitdiffstats
path: root/gold/bitcoinslc
diff options
context:
space:
mode:
authorChinaman <root@chinaman>2011-09-06 19:47:58 +0200
committerChinaman <root@chinaman>2011-09-06 19:47:58 +0200
commit108f3616e3f4958752d881192ef29e5fc4c2b045 (patch)
tree3c67478c852265219b72e6e1b05467d7065b7ba8 /gold/bitcoinslc
parentb2d65500160bcdf7abb2bf985f7da582b810e25c (diff)
parentc3bc5a6d16868c121aca780f3109155797b51d76 (diff)
Merge branch 'master' of github.com:krebscode/painload
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