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:
You're looking for courts and their availability, only to click through this nightmare: 😱🙀
That's OK! With a few easy steps, you can now be viewing court schedules with buttery smoothness:
pip install bintang-buddy
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:
-d
: Date string, in the form ofYYYY-MM-DD
-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
.
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.