Commit Graph

16 Commits

Author SHA1 Message Date
Sam 8fe759673d Update Makefile, README and service file for remindme_caldav
- The Makefile now includes installation instructions for Debian/Ubuntu based systems.
- The README has been updated with more detailed descriptions of the script's purpose, how it works, and how to use it.
- The service file has been added to manage the remindme_caldav daemon on a systemd-based system.
2024-02-15 15:21:37 +00:00
mrsu 740ac039dd Improved logging, error handling and documentation 2024-02-12 23:57:58 +00:00
mrsu 6b2d3bef53 Update dependencies 2024-02-12 02:30:50 +00:00
mrsu 2c8151870c Refactor code to combine email and XMPP alerting into single class
- Create a new module `alert_processor.py` for handling both email and XMPP alerts.
- Remove the email_alert.py and xmpp_alert.py files.
2024-02-12 02:19:49 +00:00
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 236a311b5c track .gitignore 2024-02-08 15:41:09 +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 c41a9ae7cf requirements.txt 2024-02-04 13:47:09 +00:00
mrsu 25e82df28a Merge branch 'master' of git.bitlab21.com:sam/remindme_caldav 2024-02-04 03:04:02 +00:00
sam 5da20d2d92 Initial commit 2024-02-04 03:01:11 +00:00
mrsu 5c4db272a7 inital commit 2024-02-04 02:53:30 +00:00