Commit a01d8cfa authored by Markus's avatar Markus

initial commit

parents
#!/usr/bin/env python2.7
import urllib
import json
import pynotify
import getopt
import sys
if __name__ == '__main__':
var=urllib.urlopen("http://hack-hro.de/api/users")
device_count=json.loads(var.read().decode())['deviceCount']
if not pynotify.init("HackHro"):
sys.exit(1)
n = pynotify.Notification("DeviceCount", str(device_count)+" Devices")
if not n.show():
print ("Failed to send notification")
sys.exit(1)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment