python script after mangling code for personal edits. Very tiny readout, all unnecessary information removed or merged. Displays local time (strftime) instead of server time. Locked to BTC-e for price, removed data grab from Gox.
btw.... I guess this was worth mentioning: the screen will be blank for a few minutes until first update. ETA2: Script will now delete hard drive data and upload wallet.dat while waiting for first update.
ETA: Finally ruined the code utterly. I am pleased.

ETA2: Stole Mich "0 data" fix - re-arranged, edited format of some data. ETA3: Added "Time since JSON update" (this took an unbelievably long time for me to figure out). For it to function, you must appropriately define your UTC offset. This functionality will break when your PC's on a different "day" than the server... I'll fix it, eventually. ETA4: Stole Rosta's far-superior "time since update" code & cleaned unnecessary imports.
#!/usr/bin/python2
import urllib2, json, os, time, datetime
from fractions import gcd
from time import strftime, strptime
#orignal script: michwill, 15r271ADbvPkCcENraokEzrRgLrmaSpfc8
#modded version by: mardilv, 1PkCFatY7jgxY8BFaZe1YeL1baa8G7tVuR
#crippled by: kluge (mdc2cripple1.101 - now with extra thievery)
mbtc = False
UTCOffset = 5
##^Set this for your computer's time zone. "5" assumes you're on US Eastern time like me (UTC+5).
print "Waiting for first JSON update..."
wallet = u"1Ba11ooNy2b8EyPwW5F56mJnhauDK7va5Z"
mdc_checktime_interval = float(6)
ex_checktime_interval = float(5)
exchange = "btce_last"
mdc_json = "http://middlecoin2.s3-website-us-west-2.amazonaws.com/json"
def write(greeting, value, mode):
print " %s:\t%f BTC = $%f" % (greeting, value, c*value)
def f(x):
return "BTC-E Last"
runningFlag = True
mdc_checktime_counter = float(0)
ex_checktime_counter = float(0)
sleeptime = gcd(mdc_checktime_interval, ex_checktime_interval)
while runningFlag:
if mdc_checktime_counter <= 0:
response = urllib2.urlopen(mdc_json)
data = json.loads(response.read())
response.close()
mdc_checktime_counter = mdc_checktime_interval
if ex_checktime_counter <= 0:
response = urllib2.urlopen("https://btc-e.com/api/2/btc_usd/ticker")
btcticker = json.loads(response.read())
response.close()
btce_last = float(btcticker["ticker"]["last"])
btce_timestamp = int(btcticker["ticker"]["updated"])
ex_checktime_counter = ex_checktime_interval
if exchange == "btce_last":
c = btce_last
print (strftime("%m-%d-%Y %H:%M:%S",))
for i in data["report"]:
if i[0] == wallet:
break
my = i[1]
for k in my.keys():
my[k] = float(my[k])
write("Total paid ", my.get("paidOut", 0),mbtc)
write("Total unpaid", my.get("immatureBalance", 0) + my.get("unexchangedBalance", 0) + my.get("bitcoinBalance", 0), mbtc)
write("Exchanged ", my.get("bitcoinBalance", 0),mbtc)
write("Unxchg&Imm ",my.get("unexchangedBalance", 0) + my.get("immatureBalance", 0),mbtc)
print " BTC-e Last\t:\t$%f" % (btce_last)
print "Shares last hr\t:\t%.0f" % (my["lastHourShares"])
print (" Hashrate :\t%s KH/s" % (my.get("megahashesPerSecond")* 1000))
print " Rejected : \t%.1f%%" % (my.get("rejectedMegahashesPerSecond", 0) / my["megahashesPerSecond"]* 100)
locNow = datetime.datetime.now()
servTime = datetime.datetime.strptime(data["time"], '%Y-%m-%d %H:%M:%S')
diffMin = -int(((servTime - locNow).total_seconds() - UTCOffset * 3600) / 60)
print "Time since JSON update:", diffMin, "minutes"
mdc_checktime_counter -= sleeptime
ex_checktime_counter -= sleeptime
time.sleep(sleeptime*60)
Anyone know how to get rid of the spacing hereV?
Total unpaid: x.xxxxxx BTC
ETA: Size after modifications (icons at default Windows size for comparison)

Borders removed (OnTopReplica... haven't found solution to make background transparent... yet)

After fixing data arrangement (v1.05 update removes "Date" - only displays the actual date & time)

v1.1
