Skip to content

Instantly share code, notes, and snippets.

@wireddude
Created December 18, 2015 23:08
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 wireddude/908200332c289209e46f to your computer and use it in GitHub Desktop.
Save wireddude/908200332c289209e46f to your computer and use it in GitHub Desktop.
log-ios-battery-2-thingspeak.py
# from ios workflow app, send battery percentage to clipboard before executing this
import requests
import clipboard
import webbrowser
battery = clipboard.get()
requests.post('https://api.thingspeak.com/update?key=[APIKEY]&field5='+battery)
webbrowser.open("safari-http://thingspeak.com/channels/[CHANNEL_ID]/private_show")
@wireddude
Copy link
Author

This needs to be run from pythonista.
You will need to also setup a thingspeak account as well first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment