-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.sh
More file actions
executable file
·56 lines (44 loc) · 1.35 KB
/
Copy pathstart.sh
File metadata and controls
executable file
·56 lines (44 loc) · 1.35 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
# Quick Start Script for Time Tracking Tool
set -e
echo "🚀 Time Tracking Tool - Quick Start"
echo "===================================="
# Check if venv exists
if [ ! -d "venv" ]; then
echo "📦 Creating virtual environment..."
python3 -m venv venv
fi
# Activate venv
echo "🔌 Activating virtual environment..."
source venv/bin/activate
# Install/upgrade dependencies
echo "📚 Installing dependencies..."
pip install -q -r requirements.txt
# Check for grim
if ! command -v grim &> /dev/null; then
echo "⚠️ Warning: 'grim' not found. Screenshots won't work."
echo " Install with: sudo apt install grim"
else
echo "✅ grim found - screenshots enabled"
fi
# Verify API key
if [ ! -f ".env" ]; then
echo "❌ Error: .env file not found"
echo " Create .env with: echo 'APP_API_KEY=YourExactly16CharKey' > .env"
exit 1
fi
API_KEY=$(grep -oP '(?<=APP_API_KEY=).*' .env | tr -d '\n')
KEY_LEN=${#API_KEY}
if [ "$KEY_LEN" -ne 16 ]; then
echo "❌ Error: APP_API_KEY must be exactly 16 characters (found: $KEY_LEN)"
echo " Update .env file with a valid 16-character key"
exit 1
fi
echo "✅ API Key validation passed"
# Run the app
echo ""
echo "🎯 Starting Time Tracking Tool..."
echo " Press Ctrl+C to quit"
echo " Press [T] for new task, [S] to start/stop, [H] for help"
echo ""
python main.py