https://github.com/andersinno/juomabot
Slack slash command for tracking drinks at the office
https://github.com/andersinno/juomabot
Last synced: 2 months ago
JSON representation
Slack slash command for tracking drinks at the office
- Host: GitHub
- URL: https://github.com/andersinno/juomabot
- Owner: andersinno
- License: mit
- Created: 2016-10-13T08:54:47.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2020-12-04T11:15:36.000Z (over 5 years ago)
- Last Synced: 2025-05-14T11:38:40.289Z (about 1 year ago)
- Language: Python
- Size: 14.6 KB
- Stars: 0
- Watchers: 16
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
juomabot
========
[](https://travis-ci.org/andersinno/juomabot)
[](https://codecov.io/gh/andersinno/juomabot)
:cocktail: Slack-based office drink tracker
Configuration
-------------
Juomabot is configured via environment variables.
* Use `DATABASE_URL` to declare a SQLAlchemy database URL for `dataset` to use
* Use `ADMIN_PASSWORD` to set the admin password required for administrative commands (the default is `hackme`)
Setup
-----
* Have the `juomabot.wsgi` WSGI application running on a server however you like.
For the sake of example, let's say it's running on `http://juoma.example.com/`
* Create a new slash command integration in Slack and point it to `http://juoma.example.com/slack`.
For the sake of example, let's say the command is `/juoma` and the admin password is still `hackme`.
* Set up a selection of drinks with the admin commands:
* Add a drink: `/juoma -p hackme -a --price 10 Coca-Cola`
* Set a drink's price: `/juoma -p hackme -e --price 15 Coca-Cola`
* Toggle a drink's availability: `/juoma -p hackme -t Coca-Cola`
Billing
-------
* Use `--billing-stats` to get a CSV report of unbilled drinks.
* Save the CSV and send it over to whoever is responsible for billing the drinks.
* Invoke the `--bill somehashhere` command in the billing-stats response.
* You're done! Until next time, that is. (If you rerun `--billing-stats`, it should now come up as empty.)
Development
-----------
* Use `py.test --cov .` to run tests.
* Use `python runserver.py` and ngrok or something similar to test the slash command in Slack.