forked from Xilef12000/ws2812-over-artnet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlookForUpdate.py
More file actions
17 lines (16 loc) · 763 Bytes
/
lookForUpdate.py
File metadata and controls
17 lines (16 loc) · 763 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import json
import urllib.request
import os
dirname = os.path.dirname(__file__)
data = json.load(open(os.path.join(dirname, 'config.json')))
#print(data["version"])
if (data["ignoreUpdates"] == False):
request_url = urllib.request.urlopen('https://xilef12000.github.io/versions.json')
web = request_url.read()
webStr = web.decode('UTF-8')
webData = json.loads(webStr)
#print(webData["Xilef12000"]["ws2812-over-artnet"])
if (data["version"] != webData["Xilef12000"]["ws2812-over-artnet"]):
print("There is a newer Version,\nwith Version-number " + webData["Xilef12000"]["ws2812-over-artnet"] + "\nYou are currently using Version " + data["version"])
else:
print("You are up to date\nYour Version is " + data["version"])