- Added mkdir command to create /etc/remindme_caldav directory.
- Copied config.toml to the new directory.
- Updated Makefile install instructions to include these changes.
- Updated comment in config.toml to provide a link to the readme for an example configuration.
- Removed placeholder values from all sections of the config file.
- Added check to ensure there are .ics files in the destination location before parsing them.
- If no files are found, log a message and exit with an error code.
- Updated the `parse_args()` function to include a new argument `--logfile`, which allows users to specify a custom log file. The default value is "none".
- Modified the `main()` function to check if the user provided a log file using the `--logfile` argument. If a log file is specified, it adds a FileHandler to the logger and sets the logging level based on the `--loglevel` argument.
- Updated the `remindme_caldav.service` file to include the `--logfile` argument in the `ExecStart` command. This ensures that the log file is used when the service starts.
* Move from basic logging to more detailed logging with a log file.
* Improve error handling in several functions.
* Modify the way log messages are displayed.
- Updated the install command to use python3-venv instead of python3.11-venv.
- Added alert_processor.py to the list of files copied to /opt/remindme_caldav/.
- Changed the activation of the virtual environment and pip installation commands.
- Updated logging to not use f-strings
- 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.
* 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.
* 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.