Post data extracted from Revelup into a Postgres database. This repo is mirrored at https://gitlab.com/kikobar/revelupex and https://github.com/kikobar/revelupex
Go to file
2024-08-11 14:45:08 +08:00
failed Add import orders 2024-08-11 03:47:47 +08:00
history Add import orders 2024-08-11 03:47:47 +08:00
logs Add import orders 2024-08-11 03:47:47 +08:00
upload Add import orders 2024-08-11 03:47:47 +08:00
.gitignore Do not track git patches 2024-08-11 12:57:37 +08:00
__init__.py Add import orders 2024-08-11 03:47:47 +08:00
config.py Add import orders 2024-08-11 03:47:47 +08:00
connect.py Add import orders 2024-08-11 03:47:47 +08:00
database.ini.sample Add import orders 2024-08-11 03:47:47 +08:00
import_data.py Add insert items 2024-08-11 11:40:08 +08:00
insert_hourly.py Add import hourly 2024-08-11 05:42:19 +08:00
insert_item.py Add insert items 2024-08-11 11:40:08 +08:00
insert_order.py Add import hourly 2024-08-11 05:42:19 +08:00
insert_payment.py Add insert items 2024-08-11 11:40:08 +08:00
LICENSE.md Add license 2024-08-11 03:58:58 +08:00
README.md Fix typo en documentation 2024-08-11 14:45:08 +08:00

Objective

This Python script extracts data from .csv files created by the Revelup application and post it into a Postgres 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 - 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.
  • 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.