DEMO
Automation Case Study

How Golden Crust Bakery got 4 hours back every week

A small neighborhood bakery was losing half a workday to copy-paste. One Python script fixed it in an afternoon.

The problem

Golden Crust Bakery (a fictional client) takes online orders through their website, which arrive as confirmation emails and a daily CSV export. Every morning, the owner opened each email, copied the customer name, items, and quantities into a spreadsheet by hand, then retyped the totals for the baking schedule.

It took about 4 hours a week. Worse, manual copying caused mistakes: wrong quantities, missed custom notes (like "no nuts"), and the occasional duplicated order.

4 hrs
lost per week
~12
order errors per month
0 hrs
after automation

The solution

A single Python script that runs every morning. It reads the order CSV export, cleans up the data, and writes a tidy daily baking summary. The owner now opens one file instead of forty emails.

Before and after

Before: the hand-built spreadsheet

Copied from emails each morning. Typos, duplicates, and missing notes marked in red.
CustomerItemsQtyNotes
Jonh SmithSourdogh loaf2
Maria G.croissant x6 box1no nuts??
Jonh SmithSourdogh loaf2duplicate?
Leebagel12
Priyachoc cookiess24

After: the script's daily summary

Generated automatically at 6:00 AM. Duplicates merged, names and items standardized.
CustomerItemsQtyNotes
John SmithSourdough loaf4
Maria G.Croissant box (6)1No nuts
LeeBagel (dozen)1
PriyaChocolate cookies24

The script

The actual script is short on purpose. It uses only Python's built-in libraries, so there is nothing to install and nothing that can break on update day.

# daily_orders.py, reads orders.csv, writes baking_summary.csv
import csv
from collections import defaultdict

FIXES = {"jonh": "John", "sourdogh": "Sourdough",
         "cookiess": "cookies", "choc": "Chocolate"}

def clean(text):
    text = text.strip()
    for wrong, right in FIXES.items():
        text = text.replace(wrong, right).replace(wrong.title(), right)
    return text

orders = defaultdict(lambda: {"qty": 0, "notes": ""})
with open("orders.csv") as f:
    for row in csv.DictReader(f):
        key = (clean(row["customer"]), clean(row["item"]))
        orders[key]["qty"] += int(row["qty"])
        if row["notes"].strip():
            orders[key]["notes"] = clean(row["notes"])

with open("baking_summary.csv", "w", newline="") as f:
    w = csv.writer(f)
    w.writerow(["Customer", "Item", "Qty", "Notes"])
    for (customer, item), d in sorted(orders.items()):
        w.writerow([customer, item, d["qty"], d["notes"]])

print(f"Done: {len(orders)} unique orders summarized.")

The result

The bakery's morning routine went from an hour of careful copy-paste to opening one file. Order errors dropped to zero in the first month, because the script merges duplicates and standardizes names instead of relying on tired eyes at 6 AM.

Total build time: one afternoon. Total maintenance since: none.

Drowning in copy-paste?

If a repetitive task is eating your week, a small script can probably kill it. This is a demo case study for a fictional client.

Let's automate it