Compare commits

..
1 Commits
+14 -1
View File
@@ -427,7 +427,20 @@ def api_calendar_sync_all():
summary = (evt.get('summary') or '').strip() summary = (evt.get('summary') or '').strip()
if not summary: if not summary:
continue continue
text = f"{evt['time']}{summary}" if evt.get('time') else summary date_str = evt.get('date', '')
if date_str:
try:
parts = date_str.split('-')
date_label = f"{int(parts[1])}{int(parts[2])}"
except:
date_label = date_str
else:
date_label = ''
time_str = evt.get('time', '')
prefix = f"{date_label} {time_str}" if date_label and time_str else \
(f"{date_label}" if date_label else \
(f"{time_str}" if time_str else ''))
text = f"{prefix}{summary}" if prefix else summary
loc = evt.get('location', '') loc = evt.get('location', '')
if loc: if loc:
text += f" @{loc}" text += f" @{loc}"