Created
June 5, 2012 22:34
-
-
Save anonymous/2878563 to your computer and use it in GitHub Desktop.
rg JSON -> human
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import csv | |
import json | |
import sys | |
import time | |
def main(): | |
L = json.load(sys.stdin) | |
for i in L: | |
print 'Date: ', time.strftime('%d %b %Y', time.gmtime(i['time'])), ',', | |
print 'Amount: ', i['amount'], ',', | |
if 'fee' in i: | |
print 'Fee: ', i['fee'], ',', | |
print 'Sent to: ', i['address'], | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment