From ead4c721d489e5e870d097436b8addc5c2d6c575 Mon Sep 17 00:00:00 2001 From: Jan-Peter von Hunnius Date: Mon, 31 Aug 2026 07:23:59 +0200 Subject: [PATCH] Add update.ps1 and full_script.ps1: PS counterparts of the server scripts, run in the repo folder; pull my_cars.json from moria before analysis (moria stays the single source of truth; -NoSync skips) --- full_script.ps1 | 15 +++++++++++++++ update.ps1 | 13 +++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 full_script.ps1 create mode 100644 update.ps1 diff --git a/full_script.ps1 b/full_script.ps1 new file mode 100644 index 0000000..a73dbbd --- /dev/null +++ b/full_script.ps1 @@ -0,0 +1,15 @@ +param([switch]$NoSync) +$ErrorActionPreference = 'Stop' +Set-Location $PSScriptRoot + +if (-not $NoSync) { + Write-Host "Syncing my_cars.json from moria ..." + scp -q jan@192.168.1.2:Development/top_drives/my_cars.json .\my_cars.json + if ($LASTEXITCODE -ne 0) { throw "my_cars.json sync failed" } +} + +Remove-Item .\*.csv -ErrorAction SilentlyContinue +Write-Host "Fetching repo data (cars, tracks, times - first run takes a while) ..." +cargo run --release --bin records -- fetch +cargo run --release --bin records -- all --min-count 10 --max-wishlist 305 +Write-Host "Done. CSVs are in $PSScriptRoot" diff --git a/update.ps1 b/update.ps1 new file mode 100644 index 0000000..bbd3c9c --- /dev/null +++ b/update.ps1 @@ -0,0 +1,13 @@ +param([switch]$NoSync) +$ErrorActionPreference = 'Stop' +Set-Location $PSScriptRoot + +if (-not $NoSync) { + Write-Host "Syncing my_cars.json from moria ..." + scp -q jan@192.168.1.2:Development/top_drives/my_cars.json .\my_cars.json + if ($LASTEXITCODE -ne 0) { throw "my_cars.json sync failed" } +} + +Remove-Item .\*.csv -ErrorAction SilentlyContinue +cargo run --release --bin records -- all --min-count 10 --max-wishlist 305 +Write-Host "Done. CSVs are in $PSScriptRoot"