Skip to content

Instantly share code, notes, and snippets.

@toodooleedoo
Last active August 29, 2015 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toodooleedoo/280ffa64c775262f057b to your computer and use it in GitHub Desktop.
Save toodooleedoo/280ffa64c775262f057b to your computer and use it in GitHub Desktop.
#CURL Bitcoin Rate to Pushover
USER="<<<CUT>>>"
TOKEN="<<<CUT>>>"
rate=`curl --silent 'http://www.bitcoinexchangerate.org/' |grep "#36" |sed -e 's/&#36;//g;s/ .*//g;'`
#rate=`curl --silent -k "https://www.mtgox.com" |grep "Weighted Avg:" |sed -e 's/.*<span>//g;s/<\/span>.*//g;s/\..*$//g;'`
echo "Rate: ${rate}"
curl --silent -k "https://api.pushover.net/1/messages.json" -d "token=${TOKEN}" -d "user=${USER}" -d "title=Bitcoin Exchange Rate" -d "message=${rate}" -d "url_title=MtGox" "url=https://www.mtgox.com" -d "priority=-1" -d "device=edroid" -d "url=tasker://action bitcoin" -d "url_title=Repeat"
##
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment