Octiv Slotbooker is a tool used to book slots/classes for the fitness app Octiv. It was developed to automate the weekly booking of classes, utilizing Selenium for its functionality.
The repository includes the app itself written in Python and a Dockerfile under slotBooker
. The directory structure is as follows:
OCTIV_BOOKER
│ README.md
│ justfile
│ poetry.Dockerfile
│ .pre-commit-config.yaml
│ LICENSE
│ pyproject.toml
│
└───.github/workflows
│
└───src
│ │ tests
│ │ ...
│ │
│ └───slotbooker
│ │ booker.py
│ │ ui_interaction.py
│ │ ...
│ │
│ └───utils
│ │ │ driver.py
│ │ │ gmail.py
│ │ │ logging.py
│ │ │ ...
│ │
│ └───data
│ │ classes.yaml
To run the app locally, you need to have the following installed and properly configured:
- Docker
- Chromedriver for Selenium (if running without Docker)
Poetry is used for dependency management and running the application. For local development, ensure that the required environment variables are set. You can create a .env
file in the root directory with the following content:
# .env
OCTIV_PASSWORD=password
[email protected]
EMAIL_PASSWORD=password_2
[email protected]
DAYS_BEFORE_BOOKABLE=1
EXECUTION_BOOKING_TIME=HH:MM:SS.XX
To facilitate development, a justfile
is provided. Here are some key commands:
# Run the application:**
just run
# Run the development version of the application:**
just run-dev
# Build the Docker image:**
just docker-build
# Run the Docker container:**
just docker-run
# Full Docker workflow (build and run):**
just docker-full
By using the provided justfile
and the instructions above, you can easily set up and manage your development environment for Octiv SlotBooker.