-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.bat
More file actions
78 lines (70 loc) · 2.19 KB
/
setup.bat
File metadata and controls
78 lines (70 loc) · 2.19 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
@echo off
REM Setup script for Google Docs BFS Exporter (Windows)
echo.
echo 🚀 Google Docs BFS Exporter - Setup
echo ====================================
echo.
REM Check if uv is installed
where uv >nul 2>nul
if %ERRORLEVEL% NEQ 0 (
echo 📦 Installing uv (Python package manager)...
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
REM Refresh PATH for this session
call refreshenv >nul 2>nul || (
echo.
echo ⚠️ Please close this window and run setup.bat again
echo (uv was installed but needs a new terminal session)
pause
exit /b 1
)
echo ✅ uv installed!
echo.
) else (
echo ✅ uv is already installed
echo.
)
REM Create virtual environment and install dependencies
echo 📚 Installing Python dependencies...
uv sync
if %ERRORLEVEL% NEQ 0 (
echo ❌ Failed to install dependencies
pause
exit /b 1
)
echo ✅ Dependencies installed!
echo.
REM Check for credentials.json
if not exist "credentials.json" (
echo ⚠️ Missing credentials.json
echo.
echo You need to create OAuth credentials:
echo 1. Go to https://console.cloud.google.com/
echo 2. Create a new project (or use existing^)
echo 3. Enable 'Google Docs API' and 'Google Drive API'
echo 4. Go to 'Credentials' → 'Create Credentials' → 'OAuth client ID'
echo 5. Choose 'Desktop app' as application type
echo 6. Download the JSON file and save it as 'credentials.json' in this folder
echo.
echo OR: If your colleague shared credentials.json with you, place it here now.
echo.
pause
if not exist "credentials.json" (
echo ❌ Still missing credentials.json - please add it and run this script again
pause
exit /b 1
)
)
echo ✅ credentials.json found!
echo.
echo 🎉 Setup complete!
echo.
echo Next steps:
echo 1. Find a Google Doc URL: https://docs.google.com/document/d/YOUR_DOC_ID/edit
echo 2. Run: uv run python main.py --seed-id YOUR_DOC_ID
echo.
echo The first run will open your browser to authorize the app.
echo After that, it will use cached credentials.
echo.
echo For more options: uv run python main.py --help
echo.
pause