-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.bat
More file actions
93 lines (80 loc) · 2.24 KB
/
Copy pathrun.bat
File metadata and controls
93 lines (80 loc) · 2.24 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
87
88
89
90
91
92
93
@echo off
REM Phishing URL Detector - Windows Batch Script
REM Provides convenient commands for development and testing
if "%1"=="" goto help
if "%1"=="help" goto help
if "%1"=="run-terminal" goto run_terminal
if "%1"=="run-gui" goto run_gui
if "%1"=="test" goto test
if "%1"=="lint" goto lint
if "%1"=="format" goto format
if "%1"=="clean" goto clean
if "%1"=="install-dev" goto install_dev
if "%1"=="check-all" goto check_all
if "%1"=="info" goto info
:help
echo Phishing URL Detector - Available Commands:
echo ==========================================
echo run-terminal : Run the terminal version
echo run-gui : Run the GUI version
echo test : Run unit tests
echo lint : Run flake8 linting
echo format : Format code with black
echo clean : Clean temporary files
echo install-dev : Install development dependencies
echo check-all : Run all checks (lint + test)
echo info : Show project information
echo.
echo Usage: run.bat [command]
goto end
:run_terminal
echo Running terminal version...
python phishing_detector.py
goto end
:run_gui
echo Running GUI version...
python phishing_detector_gui.py
goto end
:test
echo Running unit tests...
python -m pytest test_phishing_detector.py -v
goto end
:lint
echo Running flake8 linting...
python -m flake8 phishing_detector.py phishing_detector_gui.py test_phishing_detector.py
goto end
:format
echo Formatting code with black...
python -m black --line-length 79 *.py
goto end
:install_dev
echo Installing development dependencies...
pip install -r requirements-dev.txt
goto end
:check_all
echo Running all quality checks...
call "%~f0" lint
if errorlevel 1 goto error
call "%~f0" test
if errorlevel 1 goto error
echo All checks completed successfully!
goto end
:clean
echo Cleaning temporary files...
for /d /r . %%d in (__pycache__) do @if exist "%%d" rd /s /q "%%d"
for /r . %%f in (*.pyc) do @if exist "%%f" del "%%f"
echo Cleanup completed.
goto end
:info
echo Project: Phishing URL Detector
echo Version: 1.0.0
python --version
echo Files:
echo - phishing_detector.py (Terminal version)
echo - phishing_detector_gui.py (GUI version)
echo - test_phishing_detector.py (Unit tests)
goto end
:error
echo Command failed with errors!
exit /b 1
:end