首次提交: OnebotCatalog 项目代码与文档(含 NX 按需生成服务二期、后台、一键启动)

This commit is contained in:
wangruiguo
2026-09-03 17:55:45 +08:00
commit fafa86d3a6
241 changed files with 78656 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
@echo off
setlocal
cd /d "%~dp0"
echo ==== 1. Stop old GenServer (if any), then start new ====
taskkill /F /IM GenServer.exe >nul 2>nul
timeout /t 1 /nobreak >nul
start "GenServer" /min "%~dp0..\bin\GenServer.exe" "%~dp0genserver-config.json"
timeout /t 2 /nobreak >nul
echo ==== 2. Health check ====
powershell -NoProfile -Command "try { (Invoke-RestMethod -Uri 'http://localhost:8899/health' -TimeoutSec 5) | ConvertTo-Json } catch { Write-Host 'health FAIL: ' $_.Exception.Message }"
echo ==== 3. Trigger non-standard gen (KC0032-87) ====
powershell -NoProfile -Command "try { (Invoke-RestMethod -Method Post -Uri 'http://localhost:8899/gen' -Body '{\"series\":\"KC\",\"params\":{\"type\":\"00\",\"bore\":32,\"stroke\":87,\"magnet\":\"\",\"mount\":\"\"},\"code\":\"KC0032-87\"}' -ContentType 'application/json' -TimeoutSec 5) | ConvertTo-Json } catch { Write-Host 'gen FAIL: ' $_.Exception.Message }"
echo ==== 4. Latest job file (newest first) ====
dir /b /o-d "jobs\job_*.json" 2>nul
echo ==== 5. worker-config.txt (check nxBin line present) ====
type "worker-config.txt"
echo ==== 6. Output dir (generated models land here) ====
dir /b /s "output" 2>nul
echo ==== done ====
endlocal