From 9fdb1fc7da782eba9a61da55349cd814f8fb13da Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 22 Aug 2011 01:35:55 +0200 Subject: mtgox: add ticker text script --- btc/mtgox/json_ticker_helper.py | 7 +++++++ btc/mtgox/ticker_text.sh | 3 +++ 2 files changed, 10 insertions(+) create mode 100755 btc/mtgox/json_ticker_helper.py create mode 100755 btc/mtgox/ticker_text.sh (limited to 'btc/mtgox') diff --git a/btc/mtgox/json_ticker_helper.py b/btc/mtgox/json_ticker_helper.py new file mode 100755 index 00000000..727dd594 --- /dev/null +++ b/btc/mtgox/json_ticker_helper.py @@ -0,0 +1,7 @@ +#!/usr/bin/python + +import json,sys + +result = json.load(sys.stdin) + +print "High: " + str(result["ticker"]["high"]) + " Low: " + str(result["ticker"]["low"]) + " Last: " + str(result["ticker"]["last"]) diff --git a/btc/mtgox/ticker_text.sh b/btc/mtgox/ticker_text.sh new file mode 100755 index 00000000..2bcac134 --- /dev/null +++ b/btc/mtgox/ticker_text.sh @@ -0,0 +1,3 @@ +#!/bin/sh +dirname=`dirname $(readlink -f $0)` +$dirname/mtgox.ticker | python $dirname/json_ticker_helper.py -- cgit v1.2.3