small changes to grafic collisions
This commit is contained in:
parent
dfe340c3a1
commit
b4d6ff5510
1 changed files with 5 additions and 3 deletions
|
@ -38,6 +38,7 @@ if (os.path.isfile("./config")):
|
||||||
datafile = l[9:]
|
datafile = l[9:]
|
||||||
elif(l.startswith("calendars")):
|
elif(l.startswith("calendars")):
|
||||||
selected_cals = l[10:].split(";")
|
selected_cals = l[10:].split(";")
|
||||||
|
#here the configs for drawing the calendar start
|
||||||
elif(l.startswith("language")):
|
elif(l.startswith("language")):
|
||||||
language = l[9:]
|
language = l[9:]
|
||||||
elif(l.startswith("weekday_format")):
|
elif(l.startswith("weekday_format")):
|
||||||
|
@ -69,7 +70,7 @@ client_established = True
|
||||||
|
|
||||||
print("Looking for server...")
|
print("Looking for server...")
|
||||||
try:
|
try:
|
||||||
request = requests.get(caldav_url, timeout=timeout)
|
request = requests.get(caldav_url, timeout=timeout)
|
||||||
except (requests.ConnectionError, requests.Timeout) as exception:
|
except (requests.ConnectionError, requests.Timeout) as exception:
|
||||||
print("didn't find server, showing data from last successful connection")
|
print("didn't find server, showing data from last successful connection")
|
||||||
server_reached = False
|
server_reached = False
|
||||||
|
@ -99,8 +100,7 @@ if(server_reached and client_established):
|
||||||
print("selected calendars:")
|
print("selected calendars:")
|
||||||
for c in calendars:
|
for c in calendars:
|
||||||
print(c.name)
|
print(c.name)
|
||||||
|
|
||||||
|
|
||||||
time_events = []
|
time_events = []
|
||||||
day_events = []
|
day_events = []
|
||||||
birthdays = []
|
birthdays = []
|
||||||
|
@ -151,6 +151,7 @@ if(server_reached and client_established):
|
||||||
birthdays.append(event)
|
birthdays.append(event)
|
||||||
day_events.remove(event)
|
day_events.remove(event)
|
||||||
print("Download complete")
|
print("Download complete")
|
||||||
|
|
||||||
#back up the data received to a local copy so that it can be displayed if needed
|
#back up the data received to a local copy so that it can be displayed if needed
|
||||||
if(len(datafile)!= 0):
|
if(len(datafile)!= 0):
|
||||||
calendarlib = {"DAY_EVENTS":day_events,"TIME_EVENTS":time_events,"BIRTHDAYS":birthdays}
|
calendarlib = {"DAY_EVENTS":day_events,"TIME_EVENTS":time_events,"BIRTHDAYS":birthdays}
|
||||||
|
@ -171,6 +172,7 @@ else:
|
||||||
print(birthdays)
|
print(birthdays)
|
||||||
print(day_events)
|
print(day_events)
|
||||||
print(time_events)
|
print(time_events)
|
||||||
|
|
||||||
|
|
||||||
#with this information now the week calendar can be painted on a b/w 800x480 bitmap.
|
#with this information now the week calendar can be painted on a b/w 800x480 bitmap.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue