Manual expense tracking wastes hours every month. Here's how to build an automated expense tracker that categorizes receipts and exports to QuickBooks-compatible CSV. Auto-Categorize Expenses import sqlite3 from pathlib import Path CATEGORIES = { " office " : [ " amazon " , " staples " , " office depot " ], " software " : [ " aws " , " github " , " digitalocean " ], " travel " : [ " uber " , " lyft " , " airbnb " ], " meals " : [ " grubhub " , " doordash " , " restaurant " ], } def categorize ( description : str ) -> str : desc_lower = description . lower () for category , keywords in CATEGORIES . items (): if any ( kw in desc_lower for kw in keywords ): return category return " other " def add_expense ( amount : float , description : str , date : str ): category = categorize ( description ) conn = sqlite3 . connect ( " expenses.db " ) conn . execute ( " INSERT INTO expenses (amount, description, category, date) VALUES (?, ?, ?, ?) " , ( amount , description , category , date ) ) conn .…