/zostel_booking_check

Check if booking is available in zostel or not

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Zostel Booking notifier

Notifies you when your selected room/dorm type is available for your dates in the Zostel of your choice. It will send mail to the given Mail id (only when the booking is available) and also send desktop notifications (for GNOME users only) even when booking is not available.

  • Currently, Works with outlook only. (The FROM field should be an Outlook email)
  • Desktop Notifications only for GNOME users. When booking is not there, the notifications are of lowest priority and thus will only show in notification center and wont popup on screen. However, when the booking is available, it will show highest priority notifications for it.
  • Just fill all the files inside "data" directory and run.
  • There is an example 'creds_data.example' file available. Just fill it with your details and remove ".example" to create file containing credentials.
  • ONLY IF you want GNOME desktop notifications, You need to get the values of variables inside 'env_var_data' file from your local linux system. Otherwise, leave that file as is.

Screenshots

Booking Available Booking Not Available
The Popup Notification
Popup Notification

The Mail Mail
The Notification In Notification Panel

Get the different Values for 'data' directory

  • For booking_data, you need to get values from the zostel website by using inspect element tool in Firefox.

  • For creds_data, you need client_App_Id, client_User_Id & authorization like you got the values of booking_data file. Rest values are self-explanatory. (Don't be a retard)

  • If you need desktop notifications in GNOME, you need to fill env_var_data file with those environment variable from your local system.

  • mail_data file is self-explanatory. (Again, don't be a retard)

Installation:

  1. Clone this repository and enter the directory
git clone --depth 1 -b master https://github.com/HritwikSinghal/zostel_booking_check
cd zostel_booking_check/
  1. Install all the requirements.
pip3 install -r requirements.txt

Running the app

chmod +x main.py
./main.py

Creating cron scirpt to periodically run the app

  • Run the crontab editor (crontab -e) and enter below command to run this every minute. Replace <path_to_directory> with appropriate path.
*/1 * * * * <path_to_directory>/zostel_booking/main.py

License

GPLv3