Skip to content

gvx3/sportuni-booker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TUNI Sportuni Booking

A tool to automate booking your favorite sports activities at TUNI using Playwright (Go).

Prerequisites

  • Go version 1.24.1+ or newer must be installed.

Getting Started

  1. Clone the repository:

    git clone https://github.com/gvx3/sportuni-book.git
    cd sportuni-booker
  2. Install dependencies and Playwright browsers:

    make setup
  3. At the root directory of the project, build the binary:

    go build -o sb
  4. Run application

    ./sb
    # or specify a config file
    ./sb -f /path/to/config.yaml

Demo

Demo of SportUni booking automation

Configuration

The application requires a YAML configuration file. The config file can be located in one of the following places:

  • The current working directory (where you run the program):
    • ./config.yaml
  • The user home directory:
    • On Unix/MacOS: ~/.sportuni/config.yaml
    • On Windows: C:\Users\<YourUsername>\.sportuni\config.yaml

You can also specify a custom config file location using the CLI flag -f or --file:

./sb -f /path/to/your/config.yaml

Example config.yaml

base_url: "https://www.tuni.fi/sportuni/omasivu/?newPage=selection&lang=en"
email: "[email protected]"
password: "your_password"
state_file_name: "ms_user.json"

# activity values: Badminton, Billiards
# course_area values: hervanta, kauppi, citycentre
activity_slots:
  - day: "Tue"
    date: ""
    hour: "08:00"
    activity: "Badminton"
    course_area: "hervanta"
  - day: "Thu"
    date: ""
    hour: "13:00"
    activity: "Billiards"
    course_area: "citycentre"

About

Automation sports booking at TUNI Sportuni

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published