|
|
|
@ -65,15 +65,15 @@ radicale_props = {
|
|
|
|
|
"tag": "VCALENDAR"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
processed_cals = os.path.join(".", "calendars")
|
|
|
|
|
if not os.path.exists(processed_cals):
|
|
|
|
|
os.makedirs(processed_cals)
|
|
|
|
|
target_path = config.get("calendar", "target", fallback=os.path.join(".", "calendars"))
|
|
|
|
|
if not os.path.exists(target_path):
|
|
|
|
|
os.makedirs(target_path)
|
|
|
|
|
|
|
|
|
|
for trash_type in trash_types:
|
|
|
|
|
radicale_props["D:displayname"] = trash_type.get("name")
|
|
|
|
|
radicale_props["ICAL:calendar-color"] = "#{}ff".format(trash_type.get("farbeRgb", "000000"))
|
|
|
|
|
folder_name = trash_type.get("name").replace("/", "_")
|
|
|
|
|
trash_type_folder = os.path.join(processed_cals, folder_name)
|
|
|
|
|
trash_type_folder = os.path.join(target_path, folder_name)
|
|
|
|
|
if not os.path.exists(trash_type_folder):
|
|
|
|
|
os.makedirs(trash_type_folder)
|
|
|
|
|
|
|
|
|
|