forked from ShahjalalShohag/ProblemSolvingStats
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathspark.bat
More file actions
86 lines (72 loc) · 1.97 KB
/
spark.bat
File metadata and controls
86 lines (72 loc) · 1.97 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
85
86
@echo off
REM ProblemSolvingStats Batch Runner
REM This batch file helps run the ProblemSolvingStats scripts easily
echo ========================================
echo ProblemSolvingStats Batch Runner
echo ========================================
echo.
REM Check if dependencies are installed (using system Python)
python -c "import requests, bs4, colorama, rich, selenium" 2>nul
if errorlevel 1 (
echo Installing dependencies...
pip install -r requirements.txt
echo Dependencies installed.
) else (
echo Dependencies already installed.
)
echo.
echo Ready to run scripts with system Python.
echo.
:menu
echo Choose an option:
echo 1. Run Auto Update (fetch and update README)
echo 2. Run Manual Update (enter stats manually)
echo 3. Add or Delete Handles
echo 4. Change Display Name (customize profile names of README)
echo 5. Update README Only (regenerate README)
echo 6. Install/Update Dependencies
echo 7. Exit
echo.
set /p choice="Enter your choice (1-7): "
if "%choice%"=="1" goto auto_update
if "%choice%"=="2" goto manual_update
if "%choice%"=="3" goto manage_handles
if "%choice%"=="4" goto update_display_names
if "%choice%"=="5" goto update_readme
if "%choice%"=="6" goto install_deps
if "%choice%"=="7" goto exit
echo Invalid choice. Please try again.
goto menu
:auto_update
echo Running Auto Update...
python scripts/auto_update.py
goto after_run
:manual_update
echo Running Manual Update...
python scripts/manual_update.py
goto after_run
:manage_handles
echo Running Add or Delete Handles...
python scripts/manage_handle.py
goto after_run
:update_display_names
echo Running Update Display Names...
python scripts/change_display_name.py
goto after_run
:update_readme
echo Running Update README...
python scripts/update_readme.py
goto after_run
:install_deps
echo Installing/Updating Dependencies...
pip install -r requirements.txt
echo Dependencies updated.
goto after_run
:after_run
echo.
echo Press any key to return to menu...
pause >nul
goto menu
:exit
echo Goodbye!
pause