Adding a calendar notification #281
Answered
by
N-Coder
ChopsKingsland
asked this question in
Q&A
-
Just wondering, is there anyway to automatically add an alarm/reminder/notification to the calendar events? |
Beta Was this translation helpful? Give feedback.
Answered by
N-Coder
Mar 14, 2021
Replies: 1 comment 2 replies
-
See here, which will show you how to add an alarm to a single event. There is no "automated" way to set some alarms by default, but you can simply add the alarm to all events that don't have one set before writing out the calendar: for event in c.events:
if not event.alarms:
event.alarms = [DisplayAlarm(trigger=timedelta(hours=-2))]
with open('my.ics', 'w') as my_file:
my_file.writelines(c) |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
N-Coder
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See here, which will show you how to add an alarm to a single event. There is no "automated" way to set some alarms by default, but you can simply add the alarm to all events that don't have one set before writing out the calendar: