Add debug output support and refactor DbGenerator CLI
- Add RecognitionOptions with DebugOutputDirectory for saving pipeline
stages (input, detection, perspective correction, CLAHE preprocessing)
- Wire up IOptions<RecognitionOptions> via DI in MauiProgram
- Extract GenerateCommand from Program.cs using Spectre.Console.Cli
- Add priority card support with preferred set matching (Alpha/Beta)
- Expand card_hashes.db with more cards for better recognition coverage
- Update AGENTS.md with comprehensive project documentation
💘 Generated with Crush
Assisted-by: Claude Opus 4.5 via Crush <crush@charm.land>
This commit is contained in:
parent
54ba7496c6
commit
56499d5af9
14 changed files with 1010 additions and 456 deletions
40
.justfile
40
.justfile
|
|
@ -1,24 +1,46 @@
|
|||
# Scry development commands
|
||||
|
||||
set shell := ["C:/Program Files/Git/usr/bin/bash.exe", "-c"]
|
||||
set unstable := true
|
||||
|
||||
# Android SDK paths
|
||||
|
||||
android_sdk := env_var('LOCALAPPDATA') / "Android/Sdk"
|
||||
android_sdk := replace(env('LOCALAPPDATA'), '\', '/') / "Android/Sdk"
|
||||
adb := android_sdk / "platform-tools/adb.exe"
|
||||
emulator := android_sdk / "emulator/emulator.exe"
|
||||
camera_virtual := "-camera-back virtualscene -virtualscene-poster wall=\"" + (justfile_directory() / "TestImages/reference_alpha/serra_angel.jpg") + "\""
|
||||
camera_webcam := "-camera-back webcam0 -camera-front webcam0"
|
||||
|
||||
[private]
|
||||
@default:
|
||||
just --list
|
||||
|
||||
# Start emulator in background
|
||||
emu camera="virtual":
|
||||
{{ emulator }} -avd Pixel_6 {{ if camera == "virtual" { camera_virtual } else { camera_webcam } }} -gpu host &
|
||||
{{ emulator }} -avd Pixel_6 {{ if camera == "virtual" { camera_virtual } else { camera_webcam } }} -no-snapshot-load -gpu host
|
||||
|
||||
# Kill the running emulator
|
||||
emu-kill:
|
||||
{{ adb }} emu kill
|
||||
|
||||
# Wait for emulator to fully boot
|
||||
# Wait for emulator to fully boot (timeout after 2 minutes)
|
||||
[script]
|
||||
emu-wait:
|
||||
@echo "Waiting for emulator to boot..."
|
||||
@while [ "$({{ adb }} shell getprop sys.boot_completed 2>/dev/null)" != "1" ]; do sleep 1; done
|
||||
@echo "Emulator ready"
|
||||
# Wait for Android emulator to boot with timeout
|
||||
TIMEOUT=120
|
||||
|
||||
echo "Waiting for emulator to boot..."
|
||||
|
||||
for ((i=TIMEOUT; i>0; i--)); do
|
||||
if [ "$({{ adb }} shell getprop sys.boot_completed 2>/dev/null)" = "1" ]; then
|
||||
echo "Emulator ready"
|
||||
exit 0
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
|
||||
echo "Emulator failed to boot within 2 minutes"
|
||||
exit 1
|
||||
|
||||
# Build a project
|
||||
build project="src/Scry.App" target="net10.0-android":
|
||||
|
|
@ -52,11 +74,11 @@ test:
|
|||
dotnet test test/Scry.Tests
|
||||
|
||||
# Generate the card hash database from Scryfall
|
||||
gen-db *args: (build "tools/DbGenerator" "net10.0")
|
||||
gen-db: (build "tools/DbGenerator" "net10.0")
|
||||
@echo "Running Database generator (this takes a while)..."
|
||||
dotnet run --project tools/DbGenerator --no-build -- src/Scry.App/Resources/Raw/card_hashes.db {{ args }}
|
||||
dotnet run --project tools/DbGenerator --no-build -- src/Scry.App/Resources/Raw/card_hashes.db
|
||||
@echo "Completed generating the database"
|
||||
|
||||
# Full workflow: start emulator, wait, run with hot reload
|
||||
dev: emu emu-wait
|
||||
dev:
|
||||
dotnet watch --project src/Scry.App -f net10.0-android
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue