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"