revelupex/README.md

25 lines
1.2 KiB
Markdown
Raw Normal View History

2024-08-11 05:51:37 +00:00
**Objective**
2024-08-11 06:49:42 +00:00
This Python script extracts data from `.csv` files created by the Revelup application and post it into a Postgres database.
2024-08-11 05:51:37 +00:00
**Requirements**
* Python installed on the machine running this application.
2024-08-11 06:49:42 +00:00
* Credentials with writing access to a Postgres database.
2024-08-11 05:51:37 +00:00
**How to run this application**
* Copy the file `database.ini.sample` to `database.ini`.
* Edit `database.ini` with your credentials for the Postgres database.
* In Revelup run the following reports with output to `.csv` files:
2024-08-11 05:56:54 +00:00
* Order History - run it for any range of dates.
* Payment Summary - run it for any range of dates.
* Product Mix - run it for a SPECIFIC DATE ONLY, so if you need a range of dates you will need to run multiple reports.
* Hourly Sales - with the filters `Service Fees` and `Guests count` activated - run it for a SPECIFIC DATE ONLY, so if you need a range of dates you will need to run multiple reports.
2024-08-11 05:51:37 +00:00
* Copy all the `.csv` files generated by the Revelup reports to the `upload` folder.
* Run `python3 import_data.py`.
* The application will do the following:
* Read each line of data from the `.csv` files.
* Insert the data into the Postgres database.
* Move the `.csv` files to the `history` folder.