-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.sh
More file actions
84 lines (72 loc) · 3.65 KB
/
Copy pathsetup.sh
File metadata and controls
84 lines (72 loc) · 3.65 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/bin/bash
# LinkedinPython — One-line setup script
# Usage: bash setup.sh
set -e
echo ""
echo "╔═══════════════════════════════════════╗"
echo "║ LinkedinPython Setup ║"
echo "║ Job Intelligence Dashboard ║"
echo "╚═══════════════════════════════════════╝"
echo ""
# ── Check Python ──────────────────────────────────────────────────────────────
echo "▶ Checking Python..."
if ! command -v python3 &> /dev/null; then
echo "✗ Python 3 not found. Install it from https://python.org and re-run."
exit 1
fi
PYTHON_VERSION=$(python3 -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')")
echo " ✓ Python $PYTHON_VERSION found"
# ── Create virtual environment ────────────────────────────────────────────────
echo ""
echo "▶ Creating virtual environment..."
if [ ! -d "venv" ]; then
python3 -m venv venv
echo " ✓ Virtual environment created"
else
echo " ✓ Virtual environment already exists"
fi
# Activate
source venv/bin/activate
# ── Install dependencies ───────────────────────────────────────────────────────
echo ""
echo "▶ Installing dependencies..."
pip install --upgrade pip --quiet
pip install -r requirements.txt --quiet
echo " ✓ Dependencies installed"
# ── Install Playwright + Chromium ─────────────────────────────────────────────
echo ""
echo "▶ Installing Playwright + Chromium browser..."
echo " (This may take 1-2 minutes on first run)"
playwright install chromium
echo " ✓ Chromium installed"
# ── Create folder structure ───────────────────────────────────────────────────
echo ""
echo "▶ Creating folders..."
mkdir -p data outputs attachments
echo " ✓ data/, outputs/, attachments/ ready"
# ── .env setup ────────────────────────────────────────────────────────────────
echo ""
echo "▶ Checking .env..."
if [ ! -f ".env" ]; then
cp .env.example .env
echo " ✓ .env created from .env.example"
echo " ⚠ Edit .env and add your ANTHROPIC_API_KEY before running"
else
echo " ✓ .env already exists"
fi
# ── Done ──────────────────────────────────────────────────────────────────────
echo ""
echo "╔═══════════════════════════════════════╗"
echo "║ Setup complete! ║"
echo "╚═══════════════════════════════════════╝"
echo ""
echo "To start the dashboard:"
echo ""
echo " source venv/bin/activate"
echo " python app.py"
echo ""
echo "Then open http://localhost:5000 in your browser."
echo ""
echo "Note: Edit .env to add your LinkedIn credentials"
echo "and Anthropic API key (for AI scoring)."
echo ""