Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 1.68 KB

README.md

File metadata and controls

29 lines (20 loc) · 1.68 KB

🧾 Automatic Receipts

Python script that automates the generation and sending of receipts from orders data written in a Google Sheets.

It was initially designed for the student association CSDesign.

What does it do?

  1. 📥 It first reads the receipts data from Google Sheets,
  2. 📄 Then, it generates the receipts it can deal with,
  3. 📨 Next, the created receipts are all sent by email to the corresponding clients,
  4. ✏️ Finally, the online spreadsheet is updated.

How to generate receipts automatically?

  1. Add the following files to the root folder (*):
    • .env containing the same variables as described in example.env.
    • associations_addresses.json containing the same variables as described in example.associations_addresses.json.
    • A .png image of your association's logo in the current directory and call it logo.png. The image will be resized.
    • credentials.json which is provided by Google Cloud when requesting an access to Google Sheets API.
  2. Install the required packages by running pip install -r requirements.txt in a terminal (at the same level as the requirements.txt file)
  3. Run the script process_all_orders.py. This will first show you a summary of what will be done and ask for your confirmation. It will then process all the receipts for which it is possible.

(*) If you are a member of CSDesign, you can ask a previous tresurer to send you those files.

How does it work ?

Here is a high-level visualization of the working of this program.

Architecture diagram