abhilash1in / bintang-buddy

An easy way to find court reservations on https://bintangbadminton.org/court-reservations/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

title

The easiest way to view 🏸 court reservations in the Bay Area

Ever wanted to play badminton at a certain time? Have you tried looking for court reservations on https://bintangbadminton.org/court-reservations/? If yes, you've probably seen this:

this is what you first see when you try to make a bintang booking

You're looking for courts and their availability, only to click through this nightmare: 😱🙀

when you click through on one gym you see many courts when you click through on one court you finally see the times

That's OK! With a few easy steps, you can now be viewing court schedules with buttery smoothness: image

Command line tool

Installation

pip install bintang-buddy

Usage

The steps are straightforward and very human.

Try running the commands below:

bintang-buddy -d "2022-01-13" -g "milpitas" -g "sunnyvale"

This script has two arguments:

  1. -d: Date string, in the form of YYYY-MM-DD
  2. -g: The names of the gyms you'd like to load court schedules for. If you leave this empty you'll get every court for every gym, and you'll be waiting for a while. Your choices: campbell, dublin, milpitas, san carlos, sunnyvale.

Credits

This is a fork of teoh/bintang-buddy which provided a lot of the base functionality (kudos!). However,

  • teoh/bintang-buddy required users to clone the repository, create a virtual environment, activate it, install the project inside the virtual environment, obtain a Bearer token, set an environment variable with the Bearer token and run a Python script.
  • This process was quite involved even for a moderately technical person.

This fork, however:

  • Creates an easy-to-use CLI based on click which is published to pypi. The CLI can be installed through a single command and is ready to go.
  • Removes the need to manually (and painstakingly) obtain a Bearer token for authentication (as described here). This is now done automatically behind the scenes.
  • Uses multithreading to significantly reduce load times.
  • Uses linting and formatting tools to keep code clean and organized.
  • The goal is to eventually merge changes from this repository back into teoh/bintang-buddy.

About

An easy way to find court reservations on https://bintangbadminton.org/court-reservations/

License:MIT License


Languages

Language:Python 100.0%