-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
33 lines (27 loc) · 852 Bytes
/
run.sh
File metadata and controls
33 lines (27 loc) · 852 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
# Receipt Processor - Run (macOS / Linux)
mkdir -p uploads output logs
# Activate venv if exists
if [ -f "venv/bin/activate" ]; then
source venv/bin/activate
fi
# Check API key
if grep -q "YOUR_API_KEY_HERE" config.json 2>/dev/null; then
echo ""
echo "ERROR: API key not set!"
echo "Edit config.json and replace YOUR_API_KEY_HERE with your key."
echo ""
exit 1
fi
echo ""
echo "===================================================="
echo " Receipt Processor"
echo "===================================================="
echo ""
echo " Starting server..."
echo " Stop: Ctrl + C"
echo "===================================================="
echo ""
# Open browser after 2 seconds (background)
(sleep 2 && open "http://localhost:5000" 2>/dev/null || xdg-open "http://localhost:5000" 2>/dev/null) &
python3 app.py