Commit Graph

5 Commits

Author SHA1 Message Date
LemonNexus 706a5710a9 feat: Auto-install plugin dependencies when enabling plugins
NEW FEATURES:

1. Plugin Dependency Declaration (BasePlugin):
   - Added 'dependencies' class attribute
   - Format: {'pip': ['package1', 'package2'], 'optional': {...}}
   - Plugins can declare required pip packages

2. Plugin Dependency Manager (core/plugin_dependency_manager.py):
   - Checks if declared dependencies are installed
   - Installs missing packages via pip
   - Tracks installation status
   - Shows progress dialog during installation

3. Settings Dialog Integration:
   - When enabling a plugin with dependencies, shows dialog
   - Lists missing dependencies
   - Asks user if they want to install
   - Shows progress bar during installation
   - Handles installation failures gracefully

4. Example: Game Reader Test plugin:
   - Declares dependencies: pillow, numpy
   - Optional: easyocr, pytesseract, paddleocr
   - When enabled, prompts to install if missing

WORKFLOW:
1. User enables a plugin in Settings → Plugins
2. System checks if plugin has dependencies
3. If dependencies missing, shows dialog
4. User clicks Yes to install
5. Progress dialog shows installation progress
6. Plugin loads after dependencies installed

This eliminates manual pip install steps for plugins!
2026-02-14 23:46:01 +00:00
LemonNexus 999bdfca35 feat: Fix OCR errors and add backend installation/management
BUG FIXES:
1. EasyOCR 'Invalid input type' error:
   - PIL Images must be converted to numpy arrays
   - Added np.array() conversion before passing to EasyOCR

2. PaddleOCR 'Unknown argument: show_log' error:
   - Some versions don't support show_log parameter
   - Added try/except to handle both versions
   - Falls back to creating PaddleOCR without show_log

NEW FEATURES:
1. OCR Backend Manager (core/ocr_backend_manager.py):
   - Detects installed OCR backends
   - Checks Windows Registry for Tesseract installation
   - Searches common installation paths
   - Auto-configures pytesseract with found binary

2. Calibration Tab Improvements:
   - Added 'Install EasyOCR' button (pip install easyocr)
   - Added 'Install Tesseract Package' button (pip install pytesseract)
   - Added 'Auto-Detect Tesseract' button (checks registry/paths)
   - Added 'Install PaddleOCR' button (pip install paddleocr)
   - Shows which backends are available and where they're installed

3. Better Error Messages:
   - Clear instructions when backends are missing
   - Direct links to download pages
   - Shows detected installation paths

The app now:
- Automatically finds Tesseract from registry
- Allows installing backends from within the UI
- Properly handles all OCR input formats
2026-02-14 23:38:18 +00:00
LemonNexus d7b7b491b5 docs: Add OCR requirements section to README and improve error handling
Added to README.md:
- New 'OCR Requirements (Optional)' section after Installation
- Instructions for installing EasyOCR (recommended), Tesseract, or PaddleOCR
- Note that Game Reader works without OCR, just shows 'not available'

Improved Game Reader Test plugin:
- Better error message when Tesseract binary is not installed
- Provides download link and installation steps in error message
- Updated Calibration tab to check if Tesseract binary is available
- Shows recommendation to use EasyOCR in backend status

This helps users understand why they get 'tesseract is not installed'
errors and how to fix them.
2026-02-14 20:27:31 +00:00
LemonNexus a80a9ccd06 feat: Add File Test tab to Game Reader Test plugin
Added new 'File Test' tab that allows testing OCR on saved screenshot files.
This is useful when:
- The game is not currently running
- You want to test OCR on a specific saved screenshot
- You want to compare OCR results on the same image

Features:
- Browse button to select image files (PNG, JPG, BMP, TIFF)
- Backend selection (Auto/EasyOCR/Tesseract)
- Displays filename and processing stats
- Shows which backend was used and processing time

The original 'Quick Test' still captures the current screen.
The new 'File Test' lets you test on saved images.
2026-02-14 20:07:47 +00:00
LemonNexus 219d0847b2 feat: Add Log Parser and Game Reader Test Plugins
NEW TESTING PLUGINS:

1. Log Parser Test Plugin (plugins/log_parser_test/)
   - Real-time event monitoring with counters
   - Visual event history table (last 100 events)
   - Raw log line viewer
   - Simulated event buttons for testing:
     * Skill Gain
     * Loot
     * Damage
   - Event type filtering and statistics
   - Color-coded event types
   - Auto-scroll and refresh

2. Game Reader Test Plugin (plugins/game_reader_test/)
   - Quick OCR test with progress bar
   - Region-specific OCR testing with presets:
     * Chat Window
     * Skills Window
     * Inventory
     * Mission Tracker
   - OCR backend selection (Auto/EasyOCR/Tesseract/PaddleOCR)
   - Processing time tracking
   - Test history with results
   - Save/copy OCR results
   - Calibration tools:
     * Display DPI detection
     * Backend status checker
     * OCR tips and best practices

FEATURES FOR BOTH:
- Modern EU-styled UI
- Tabbed interface
- Error handling and logging
- Background processing (no UI freeze)
- Real-time updates

These plugins serve as both testing tools and demonstrations
of the Log Reader and OCR core services capabilities.
2026-02-14 19:08:17 +00:00