$ show kel-z/HSR-Scanner
HSR-Scanner is a desktop application that automates the extraction of game data from Honkai: Star Rail using computer vision techniques. It simulates keyboard and mouse inputs to navigate the game's inventory system, captures screenshots of items, and uses OCR (Optical Character Recognition) to extract item statistics. The extracted data is exported to JSON format compatible with third-party optimizers. The application features a PyQt6-based GUI with configurable scan options, hotkeys, and performance tuning parameters.
The LLM identified 4 files worth highlighting for reuse:
Provides simple thread counting utilities for managing OCR concurrency. Zero external dependencies beyond standard library, making it highly reusable in any project needing to manage worker threads based on available CPU cores.
Implements a generic retry mechanism for handling duplicate captures in OCR processes. Features exponential backoff and logging, with minimal dependencies. Can be extracted and used in any scenario where duplicate detection and recovery is needed.
Core OCR functionality with customizable preprocessing pipelines, character whitelisting, and Tesseract configuration management. Includes sophisticated error handling and preprocessing optimizations for game text extraction. While it has some project-specific dependencies, the core OCR patterns are broadly applicable.
Abstracts keyboard, mouse, and gamepad inputs for application automation. Provides coordinate translation, image-based cursor positioning, and input timing controls. Though tuned for the specific game, the navigation patterns and abstractions are reusable for similar automation tasks.