Skip to content

Enhanced Automation with Improved Error Handling and Modularization

Latest

Choose a tag to compare

@Phoenix-H22 Phoenix-H22 released this 10 Jan 19:30
· 1 commit to main since this release

What's New?

  1. Improved Error Handling:

    • Exception handling enhanced to send WhatsApp notifications on failure at every step.
    • Includes detailed error messages and stack traces for better debugging.
  2. Retry Mechanism:

    • Introduced automatic retry for failed executions, ensuring the process completes successfully.
  3. Code Modularization:

    • Modularized the codebase for improved readability and maintainability.
    • WhatsApp messaging service initialization moved to the constructor to avoid redundancy.
  4. Dynamic Browser Compatibility:

    • Fixed compatibility issues with Chrome and Chromium browsers on different environments (e.g., Ubuntu with Snap).
  5. Secure File Management:

    • Decrypted files are now safely handled and removed after execution.
  6. User Notifications:

    • Enhanced WhatsApp messages for successful and failed bookings, providing clear feedback to users.

Installation & Setup

  1. Clone the repository:

    git clone https://github.com/your-username/MealBuddy.git
    cd MealBuddy
  2. Create and activate a Python virtual environment:

    python3 -m venv bookingenv
    source bookingenv/bin/activate
  3. Install dependencies:

    pip install -r requirements.txt
  4. Configure the .env file with your environment variables:

    • CHROMEDRIVER_PATH
    • WHATSAPP_APP_KEY
    • ENCRYPTION_KEY
    • And more…
  5. Schedule the script to run automatically via Cron (e.g., every evening).


Bug Fixes

  • Resolved "DevToolsActivePort file doesn't exist" error for Chromium on Ubuntu.
  • Fixed issues with small screen sizes affecting sidebar interaction.

Future Plans

  • Add support for multiple meal types and meal booking time customization.
  • Provide a web interface for easier management of users and configurations.

Repository: DormMealBot
Instructions: If you like the tool or find it useful, give it a ⭐ on GitHub!