improve make.bat

This commit is contained in:
edoardottt
2025-04-07 14:42:56 +02:00
parent 69acf8143b
commit 709c4fc6aa
3 changed files with 22 additions and 13 deletions
+2 -2
View File
@@ -115,7 +115,7 @@ Usage of cariddi:
-json
Print the output as JSON in stdout.
-md
Maximum level the crawler will follow from the initial target URL.
Maximum depth level the crawler will follow from the initial target URL.
-i string
Ignore the URL containing at least one of the elements of this array.
-info
@@ -178,7 +178,7 @@ Examples 💡
- `cat urls | cariddi -ua "Custom User Agent"` (Use a custom User Agent)
- `cat urls | cariddi -json` (Print the output as JSON in stdout)
- `cat urls | cariddi -sr` (Store HTTP responses)
- `cat urls | cariddi -md 3` (Max 3 levels)
- `cat urls | cariddi -md 3` (Max 3 depth levels)
- For Windows:
- use `powershell.exe -Command "cat urls | .\cariddi.exe"` inside the Command prompt
+19 -10
View File
@@ -2,32 +2,32 @@
SET ARG=%1
IF "%ARG%"=="windows" (
IF /I "%ARG%"=="windows" (
CALL :Windows
GOTO Done
)
IF "%ARG%"=="unwindows" (
IF /I "%ARG%"=="unwindows" (
CALL :Unwindows
GOTO Done
)
IF "%ARG%"=="update" (
IF /I "%ARG%"=="update" (
CALL :Update
GOTO Done
)
IF "%ARG%"=="tidy" (
IF /I "%ARG%"=="tidy" (
CALL :Tidy
GOTO Done
)
IF "%ARG%"=="lint" (
IF /I "%ARG%"=="lint" (
CALL :Lint
GOTO Done
)
IF "%ARG%"=="remod" (
IF /I "%ARG%"=="remod" (
del go.mod
del go.sum
go mod init github.com/edoardottt/cariddi
@@ -35,23 +35,28 @@ IF "%ARG%"=="remod" (
GOTO Done
)
IF "%ARG%"=="test" (
IF /I "%ARG%"=="test" (
CALL :Test
GOTO Done
)
IF /I "%ARG%"=="help" (
CALL :Help
GOTO Done
)
GOTO Done
:Test
set GO111MODULE=on
set CGO_ENABLED=0
echo Testing ...
go test -v ./...
go test -v "./..."
echo Done
EXIT /B 0
:Tidy
go get -u ./...
go get -u "./..."
go mod tidy -v
echo Done.
EXIT /B 0
@@ -63,7 +68,7 @@ EXIT /B 0
:Update
set GO111MODULE=on
echo Updating ...
go get -u ./...
go get -u "./..."
go mod tidy -v
CALL :Unwindows
git pull
@@ -85,4 +90,8 @@ del /f cariddi.exe
echo Done.
EXIT /B 0
:Help
echo Usage: make.bat [windows | unwindows | update | tidy | lint | remod | test]
EXIT /B 0
:Done
+1 -1
View File
@@ -144,7 +144,7 @@ func ScanFlag() Input {
storeRespPtr := flag.Bool("sr", false, "Store HTTP responses.")
maxDepth := flag.Int("md", 0, "Maximum level the crawler will follow from the initial target URL.")
maxDepth := flag.Int("md", 0, "Maximum depth level the crawler will follow from the initial target URL.")
flag.Parse()