anufrievroman / calcure

Modern TUI calendar and task manager with minimal and customizable UI.
https://anufrievroman.gitbook.io/calcure
MIT License
1.51k stars 43 forks source link

Support recurring events from .ics #104

Closed janusfil closed 1 month ago

janusfil commented 1 month ago

This implementation will generate reccuring events based on RRULE in ics file. It will generate infinity events only for 1 year, so if you want to see more events in next years you need to reload data in that year (with Q) note: please feel free to comment and repair me or offer a better solution, I am not python developer :innocent:

Closes #94

anufrievroman commented 1 month ago

Thank you for working on this! I'll check and test as soon as I can.

anufrievroman commented 1 month ago

Thank you again for your contribution! It seems to work fine. Ideally, I'd prefer all the rrule stuff to be read and converted into internal fields like repetitions and frequency already in the loaders.py, so that we don't carry those field through the program. However, I guess it's not always possible if the rrule is more complicated than "repeat every X for N times". So, let's keep it like that for now, as it works.

anufrievroman commented 1 month ago

By the way, while we are at it, may I ask what is exactly exdate and what it contains?

janusfil commented 1 month ago

Yep, my first try was exactly converting to internal fields but as you guessed, real events can be more complicated. You can have specific days for recurring event and you can have interval between them (each 2 weeks instead of each week). And exdate is for exclude specific date from repetition. (If you do remove on recurring event in google calendar and choose Only this event)

anufrievroman commented 1 month ago

I see, okay, thank you for the explanation !