-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.bat
More file actions
72 lines (69 loc) · 2.27 KB
/
init.bat
File metadata and controls
72 lines (69 loc) · 2.27 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
@echo off
echo ========================================
echo Reddit Bot Initialization Script
echo ========================================
echo.
echo Installing Python requirements...
echo.
set /p "pip_params=Enter additional pip install parameters (e.g., --upgrade --user) or press Enter to continue: "
echo.
if "%pip_params%"=="" (
echo Running: pip install -r requirements.txt
pip install -r requirements.txt
) else (
echo Running: pip install %pip_params% -r requirements.txt
pip install %pip_params% -r requirements.txt
)
if %errorlevel% neq 0 (
echo Error: Failed to install requirements
pause
exit /b 1
)
echo Requirements installed successfully!
echo.
echo Checking environment file...
if exist .env (
echo .env file already exists. Checking if it has configuration...
findstr /C:"CLIENT_ID" .env >nul
if %errorlevel% equ 0 (
echo .env file exists and has configuration. Skipping .env creation.
) else (
echo .env file exists but has no CLIENT_ID configuration. Creating new .env file...
(
echo # Reddit API Configuration
echo CLIENT_ID=your_client_id_here
echo SECRET_KEY=your_secret_key_here
echo USERNAME=your_reddit_username_here
echo PASSWORD=your_reddit_password_here
) > .env
)
) else (
echo Creating .env file with required parameters...
(
echo # Reddit API Configuration
echo CLIENT_ID=your_client_id_here
echo SECRET_KEY=your_secret_key_here
echo USERNAME=your_reddit_username_here
echo PASSWORD=your_reddit_password_here
) > .env
)
echo.
echo ========================================
echo Initialization Complete!
echo ========================================
echo.
echo IMPORTANT: Please edit the .env file and replace the placeholder values with your actual Reddit API credentials:
echo - CLIENT_ID: Your Reddit app client ID
echo - SECRET_KEY: Your Reddit app secret key
echo - USERNAME: Your Reddit username
echo - PASSWORD: Your Reddit password
echo.
echo To get Reddit API credentials:
echo 1. Go to https://www.reddit.com/prefs/apps
echo 2. Click "Create App" or "Create Another App"
echo 3. Choose "script" as the app type
echo 4. Use the generated client ID and secret
echo.
echo After updating .env, you can run: python main.py
echo.
pause