Commit Graph

8 Commits

Author SHA1 Message Date
mrsu ea34a0ef32 minor changes 2024-02-12 01:21:50 +00:00
mrsu e4c42de74c created CalendarParser class 2024-02-11 19:43:33 +00:00
mrsu f239b4fb23 Complete refactor of script to make it more pythonic 2024-02-10 23:53:15 +00:00
mrsu f6b1b2d5ee Refactor remindme_caldav.py for improved code maintainability and readability
* Refactored `remindme_caldav.py` to separate concerns into different functions:
  - `calendar_parser()`: Parses the calendar and generates event dictionaries.
  - `generate_recurring_event_dates()`: Generates recurring event dates based on a start date and an RRULE.
  - `get_next_alert()`: Calculates the next alert time for each event.
  - `process_alert()`: Processes alerts for each event.
* Implemented error handling in `calendar_parser()` to catch missing components without crashing the program.
* Added comments and docstrings for better code readability and maintainability.
* Modified `get_next_alert()` to handle events with no recurring dates.
* Updated `process_alert()` to subtract 15 seconds from the next alert time to ensure alerts are triggered before the event occurs.
* Added a human-readable format for the time until the next alert in the status message.
2024-02-10 19:37:37 +00:00
Sam 92e1578bbc Replace toml with humanfriendly library for email alert and update send\_email function with event details
* Update import statement in email_alert.py to include humanfriendly library
* Modify send_email function signature in email_alert.py to accept an event dictionary instead of separate arguments
* Extract event name, description, location, date, and time until event from the event dictionary and use them in the email body
* Update email body format string accordingly
* Use humanfriendly library to format time difference between next alert and next event into a human-readable format.
2024-02-09 12:08:31 +00:00
mrsu 1b225d08fd modify datetime 2024-02-08 15:32:49 +00:00
mrsu eb6b8db0ea alerting and filehandling
Added both xmpp and email alerting
Proper FileHandling to manage modified, deleted and new events
Argument parsing and added toml config
2024-02-06 19:02:44 +00:00
mrsu 5c4db272a7 inital commit 2024-02-04 02:53:30 +00:00