A super lightweight, hyper modern approach to the classic coaster-to-keep-track-of-consumptions tool.
The scanner.py
application can be used in combination with a barcode-scanner (you can buy it online), that will be plugged into your machine. This application keeps track of consumed drinks.
The bot.py
is used to control the application (add products, check your balance, get your personal barcode...).
Run both the scanner and the bot. When someone wants a drink or a snack, the person scans it's own personal barcode (that is generated by the telegram bot). If a product is shared by multiple people, all their barcodes should be scanned. Then, the product itself is scanned. The price is shared (if multiple people), and the balance is stored in the database. Afterwards everyone has the possibility to retrieve their balance via the telegram bot and pay the host-of-the-night for their expenses.
Need: python, pip, sqlite3, barcode scanner
Install requirements:
$ pip install -r requirements
Create database (with name coaster.db, but may be changed if wanted):
$ sqlite3 coaster.db
A .env
-file is needed to keep your secrets. See .env_example
for the needed keys.