Just a simple repo to calculate how much to request from people after a night out
- Clone the repository:
git clone https://github.com/pomkos/payme
cd payme
- Create a conda environment (optional):
conda create --name "pay_env"
- Activate environment, install python, install dependencies.
conda activate pay_env
conda install python=3.8
pip install -r requirements.txt
- Start the application:
streamlit run apps/main.py
- Access the application at
localhost:8501
sudo chmod +x install.sh
sudo chmod +x start_me.sh
./install.sh
Installer script will:
- Create new environment
- Install all required python libraries
- Add a cronjob to cron (if user desires, can be done post installation as well)
- Start the payme script on
port 8501
The codebase is organized as such:
payme
|-- apps
|-- main.py # the brains behind it all, redirects user provided information to the appropriate scripts in apps folder
|-- calculator.py # called by all scripts for the actual calculations
|-- db_tool.py # includes helper class to connect to sqlite db and extract currency info
|-- doordash.py # specific to doordash receipts, extracts all info
|-- food_select.py # used by the complex receipt receiver and the claim your meal pages
|-- manual_mode.py # used by default view of payme, using user provided info
|-- ubereats.py # specific to ubereats receipts, extracts all info
|-- data
|-- currency.db # stores currency, country, rate info
|-- food.db # stores complex receipt info so users can select foods
|-- names.db # stores names, variations of names, and mispellings to automatically parse these from all inputs
|-- images
|-- .gitignore
|-- README.md
|-- requirements.txt
Stores information from the complex receipt receiver on payme
item | price | amount | name | people | date |
---|---|---|---|---|---|
Buck to the Future (1.0 bought) | 14.0 | 1.0 | Roosevelt Room_05-21 | Peter, Matt, Steve, Julie, Aron, Kyle | 2021-05-21 |
Stores information from the claim your meal section on payme. This is what is shown when users click "see everyone's claimed meals"
name | food | price | amount | total_item_price | label |
---|---|---|---|---|---|
Peter | [dessert] medovik cake (1.0 bought) | 8.00 | 1.0 | 8.00 | Russia House_05-02 |
country | currency | code |
---|---|---|
United Kingdom | Pound Sterling | GBP |
rate | country | currency | code | date_updated |
---|---|---|---|---|
0.729266 | United Kingdom | Pound Sterling | GBP | 2021-03-25 |
Just a database of names with different spellings, for easier parsing of info
names | |
---|---|
bl@ise |