6.7.0 - Alpha6 - Scrapers 工具打印日志内容兼容窗口宽度不足的情况

This commit is contained in:
SuperMonster003
2025-10-03 16:15:21 +08:00
parent 9b06086a55
commit 9dd55a063d
7 changed files with 217 additions and 45 deletions

View File

@@ -3,14 +3,29 @@
node "run-scrapers.mjs"
ECHO.
ECHO Press [R] to rerun the scrapers, or [ESC]/[Enter]/[Space] to exit...
powershell -NoLogo -NoProfile -Command "$ErrorActionPreference='Stop'; while($true){ $k=$Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown'); if($k.VirtualKeyCode -eq 27 -or $k.VirtualKeyCode -eq 13 -or $k.Character -eq ' '){ exit 1 } elseif($k.Character -match '^[Rr]$'){ exit 0 } }"
ECHO Press [R] to rerun, [Shift+R] to clear screen then rerun, or [ESC]/[Enter]/[Space] to exit...
powershell -NoLogo -NoProfile -Command ^
"$ErrorActionPreference='Stop';" ^
"while($true){" ^
" $k=$Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown');" ^
" if($k.VirtualKeyCode -eq 27 -or $k.VirtualKeyCode -eq 13 -or $k.Character -eq ' '){ exit 1 }" ^
" elseif($k.VirtualKeyCode -eq 82){" ^
" $isShift = ($k.ControlKeyState -band 0x0010) -ne 0 -or ($k.ControlKeyState -band 0x0080) -ne 0;" ^
" if($isShift){ exit 2 } else { exit 0 }" ^
" }" ^
"}"
IF ERRORLEVEL 2 GOTO SHIFT_R
IF ERRORLEVEL 1 GOTO EXIT
ECHO.
GOTO RUN
:SHIFT_R
CLS
ECHO.
GOTO RUN
:EXIT
ECHO.
EXIT /B