Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
How to get Reminders of Specific Calendars
-
Howdy folks,
I just started messing around with the reminders module, and I cannot figure out how to get all the reminders for a specific calendar or how to get the Calendar for specific reminders.
I don't see any reference to how to do this in the documentation (http://omz-software.com/pythonista/docs/ios/reminders.html#reminders.Calendar), and inspecting Calendar and Reminder objects also seems fruitless.
Relationships between the reminders/calendars is a pretty central concern so this seems like a huge omission.
Does the reminders module truly omit this or am I missing something obvious?
-
Did you try this?
reminders.get_reminders(calendar=None, completed=None)
Return all reminders in the given Calendar (or all calendars). Seems exactly what you are looking for.
-
@jmnickerson, to find a specific calendar to use in the above, you need to do something like the following:
all_calendars = reminders.get_all_calendars() for calendar in all_calendars: if calendar.title == my_cal_name: my_calendar = calendar break
-
@pulbrich Oh ok. Party. That looks like just what I needed. Thanks 👌👍
Something like this does the trick then.
cals = {cal.title: reminders.get_reminders(calendar=cal, completed=False) for cal in reminders.get_all_calendars()}
-
Cool. Thanks for this 👍