From a357fad22182886dfdf0c593ba386a0cf4751628 Mon Sep 17 00:00:00 2001 From: Enrique Barcelli Date: Sun, 11 Aug 2024 13:51:37 +0800 Subject: [PATCH] Add README.md --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..2e5f2e4 --- /dev/null +++ b/README.md @@ -0,0 +1,24 @@ +**Objective** + +This Python script extracts data from .cvs files created by Revelup application into a Postres database. + +**Requirements** + +* Python installed on the machine running this application. +* Credentials with writing access to a Postgres database + +**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: + * Order History - for a range of dates. + * Payment Summary - for a range of dates. + * Product Mix - for a SPECIFIC date, 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 - for a SPECIFIC date, so if you need a range of dates you will need to run multiple reports. +* 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.