Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/saeed-at/gym_automation

A python selenium bot to automate gym reservation.
https://github.com/saeed-at/gym_automation

gym pyqt5 python3 selenium-python

Last synced: about 1 month ago
JSON representation

A python selenium bot to automate gym reservation.

Awesome Lists containing this project

README

        

# Gym_Automation



header



A Gym Automation project designed to book preferred gym sessions within the [AUT University portal](https://samad.aut.ac.ir/index.rose) using Python.


License
Last Commit
Languages Count

## Table of Contents

1. [Introduction](#introduction)
2. [Features](#features)
3. [Prerequisites](#prerequisites)
- [Installation and Environment Setup](#installation-and-environment-setup)
- [ChromeDriver Setup](#chromedriver-setup)
4. [Project Structure](#project-structure)
5. [Usage](#usage)
6. [Contributing](#contributing)
7. [License](#license)

## Introduction

The `Gym Automation` project is a Python-based application tailored to streamline the gym session reservation process. Leveraging Selenium for automation and a PyQt5-based user interface, users can securely input their login credentials and effortlessly select their desired gym sessions. The project aims to provide a user-friendly, automated solution for efficient and secure gym session reservations.

▲Back

## Features

- **Selenium Automation**: Automates gym session reservations through the samad.aut.ac.ir website.
- **Secure Credentials Handling**: Encrypts and stores user credentials for secure login.
- **Flexible Session Selection**: Allows users to select preferred gym sessions for reservation.
- **Informative Logging**: Provides logs to track the reservation process, errors, and successes.
- **Configurable and Extensible**: Modular code structure for easy maintenance and further feature additions.

▲Back

## Prerequisites

### Installation and Environment Setup

- **Python Installation**: Ensure you have a compatible version of Python installed. If not, download and install Python from the [official Python website](https://www.python.org/downloads/).

- **Package Installation**: Install the necessary Python packages using the provided `requirements.txt` file by running:
```sh
pip install -r requirements.txt

### ChromeDriver Setup
Download and configure ChromeDriver for your system to work with Selenium.

▲Back

## Project Structure
The project structure separates different functionalities into various modules:

- `main.py`: Orchestrates the main logic for gym session reservations and handles the Selenium automation process.
- `utils.py`: Contains utility functions for encrypting and decrypting credentials, reading/writing preferred session data to JSON files, and other miscellaneous functions.
- `checkbox_input.py`: Stores information about available gym sessions for different days and times.
- `gui.py`: Implements the graphical user interface using PyQt5 for user login and session selection.
- `logger.py`: Sets up logging configurations to manage logs in the application.
- `styles.py`: Contains various style configurations for PyQt5 widgets used in the GUI.

▲Back

## Usage
1. Set up a server and run the application on it, or simply turn on your laptop and execute the main.py file. The first time you run the main.py file, a window will appear, prompting you to enter your username and password associated with your samad.aut.ac.ir account:

page1


2. After entering your password and username, click on the `Proceed to Schedule` button. Another page will appear, allowing you to choose your preferred gym sessions for automation and click on `Next` button:

page2


3. Now the automation process will start automatically and you can see the results in `Logs` directory.

4. [Optional] You can add `main.py` to start up in your ubuntu with `crontab`, there are also alternative ways for windows.

▲Back

## Contributing
Contributions are welcome! If you have suggestions, improvements, or bug fixes, feel free to open issues or pull requests.

▲Back

## License
This project is licensed under the MIT License. See the LICENSE file for details.

▲Back


Made with ❤️ by saeed-at