How d3m-sudo/anura works
Anura is a native Linux desktop OCR and barcode-reading application. The user captures a screen region or supplies an image; the screenshot service runs barcode detection and OCR, the controller dispatches the extracted result, and the application can copy it to the clipboard and present it in the editor. Other documented branches include language-model management, speech, sharing, preferences, and opt-in local history. Arrows below are limited to relationships visible in excerpts or explicitly documented in the README; several feature implementations were not sampled.
Main entry points: window.py Main window · ocr_controller.py OCR controller · screenshot_service.py Capture and OCR · language_manager.py Language manager
Components 28
App and UI
- Application
anura/main.py - Main window
anura/window.py - Welcome page
anura/widgets/welcome_page.py - Extracted editor
anura/widgets/extracted_page.py - History page
anura/widgets/history_page.py - Preferences UI
anura/widgets/preferences_dialog.py - Shortcut overlay
anura/widgets/shortcuts_overlay.py
Capture and extraction
- OCR controller
anura/controllers/ocr_controller.py - Drop controller
anura/controllers/dnd_controller.py - Capture and OCR
anura/services/screenshot_service.py - Barcode detection
anura/utils/barcode_detector.py
Core services
- Language manager
anura/services/language_manager.py - Model downloads
anura/services/language/download_manager.py - Model cache
anura/services/language/cache_manager.py - Language validation
anura/services/language/validator.py - Settings
anura/services/settings.py - Task manager
anura/core/atomic_task_manager.py
User features
- Clipboard
anura/services/clipboard_service.py - Result dispatcher
anura/services/result_dispatcher.py - Local history
anura/services/history_service.py - Speech controller
anura/controllers/tts_controller.py - Speech service
anura/services/tts/service.py - Speech pipeline
anura/services/tts/pipeline_manager.py - Share service
anura/services/share_service.py
Models and processing
- Smart parsing
anura/transformers/magic_processor.py - OCR result model
anura/models/ocr.py
Other components
- Desktop user
- Desktop screenshot portal
Connections 30
- Desktop user → Welcome page: provides image
- Desktop user → Main window: requests capture
- Main window → OCR controller: coordinates
anura/window.py - Main window → Drop controller: coordinates
anura/window.py - OCR controller → Capture and OCR: handles capture signals
anura/controllers/ocr_controller.py - Capture and OCR → Desktop screenshot portal: captures screen
- Capture and OCR → Barcode detection: detects codes
anura/services/screenshot_service.py - Capture and OCR → Task manager: dispatches work
anura/services/screenshot_service.py - Capture and OCR → Language manager: uses OCR models
anura/services/screenshot_service.py - Capture and OCR → Smart parsing: parses text
anura/services/screenshot_service.py - OCR controller → Result dispatcher: dispatches result
anura/controllers/ocr_controller.py - OCR controller → Local history: records extraction
anura/controllers/ocr_controller.py - OCR controller → OCR result model: handles OCR result
anura/controllers/ocr_controller.py - Result dispatcher → OCR result model: uses result model
anura/services/result_dispatcher.py - Main window → Clipboard: uses clipboard
anura/window.py - Application → Main window: creates window
anura/main.py - Application → OCR controller: wires result signals
anura/main.py - OCR controller → Extracted editor: presents extraction
- Desktop user → Extracted editor: edits result
- Main window → History page: offers history
anura/window.py - Main window → Preferences UI: offers preferences
anura/window.py - Main window → Shortcut overlay: offers shortcuts
anura/window.py - Language manager → Model downloads: delegates downloads
anura/services/language_manager.py - Language manager → Model cache: uses model cache
anura/services/language_manager.py - Language manager → Language validation: validates language
anura/services/language_manager.py - Main window → Settings: uses settings
anura/window.py - Speech controller → Speech service: uses speech service
anura/controllers/tts_controller.py - Speech service → Speech pipeline: runs pipeline
anura/services/tts/service.py - Speech pipeline → Settings: reads settings
anura/services/tts/pipeline_manager.py - Extracted editor → Share service: shares text
anura/widgets/extracted_page.py