I’m not much intro cryptocurrencies but I got this nice script that outputs the price of Bitcoin when invoked:
$ cat /usr/bin/bitcoin
#!/bin/bash
curl -s http://api.coindesk.com/v1/bpi/currentprice.json | python -c "import json, sys; print(json.load(sys.stdin)['bpi']['USD']['rate'])"
It’s simple and effective. Maybe someone finds a use for this.
It practically reads an online JSON database file via the Coindesk API using curl
and then uses Python to read certan tables from that JSON file.