|
|
@ -25,11 +25,13 @@ def import_calendar(calendar):
|
|
|
|
events = {}
|
|
|
|
events = {}
|
|
|
|
for event in cal.walk("vevent"):
|
|
|
|
for event in cal.walk("vevent"):
|
|
|
|
uid = event.decoded("uid").decode()
|
|
|
|
uid = event.decoded("uid").decode()
|
|
|
|
summary = event.decoded("summary").decode()
|
|
|
|
summary = (event.decoded("summary", None) or b"").decode()
|
|
|
|
description = (event.decoded("description", None) or b"").decode()
|
|
|
|
description = (event.decoded("description", None) or b"").decode()
|
|
|
|
start = event.decoded("dtstart").astimezone(timezone.utc)
|
|
|
|
start = event.decoded("dtstart").astimezone(timezone.utc)
|
|
|
|
end = event.decoded("dtend").astimezone(timezone.utc)
|
|
|
|
end = event.decoded("dtend").astimezone(timezone.utc)
|
|
|
|
location = event.decoded("location", None)
|
|
|
|
location = event.decoded("location", None)
|
|
|
|
|
|
|
|
if not summary:
|
|
|
|
|
|
|
|
continue
|
|
|
|
if location is not None:
|
|
|
|
if location is not None:
|
|
|
|
location = location.decode()
|
|
|
|
location = location.decode()
|
|
|
|
|
|
|
|
|
|
|
|