How kjt7578/rec_chart works
Project type and purpose
• This is a PyQt6-based desktop application (“Rec Chart OCR”) that assists recruiters by performing real-time OCR on interview video feeds, running AI-based screening and summarization, and generating structured reports.
• It’s not a classic web front-end/back-end but a modular desktop system with UI, core‐processing, AI integration, and persistence layers.
File structure
• Top-level directories:
• ocr/ – standalone OCR scripts (legacy or demo)
• src/ – main application code
– config/ • settings.py
– core/ • ocr_engine.py, screen_capture.py
– gpt/ • enhanced_analyzer.py, summarizer.py
– ui/ • widgets and main_window.py
– utils/ • document_saver.py
– main.py • application entry point
• Other: setup.py, tasks.md, utils/document_saver.py (duplicate util)
• External dependencies are declared in requirements.txt (PyQt6, pytesseract, mss, openai, pillow, etc.)
README insights
• 3-stage workflow: template setup → real-time capture & screening → enhanced analysis & report.
• OCR uses pytesseract+Pillow, capture uses mss, AI uses OpenAI GPT-3.5/4.
• Persistent artifacts: JSON templates, .txt reports.
• UI is built with stacked widgets and splitters to reflect the 3-step flow.
Main components & interactions
1. UI Layer (PyQt6)
• main_window.py
• capture_widget.py, interview_widget.py, summary_widget.py, result_widget.py, template_editor.py
2. & OCR Layer
• core.screen_capture (mss-based)
• core.ocr_engine (pytesseract + Pillow)
3. AI Analysis Layer
• gpt.enhanced_analyzer (comprehensive interview analysis)
• gpt.summarizer (real-time summarization)
4. Configuration Layer
• config.settings (user templates, API keys, capture intervals)
5. Persistence & Reporting Layer
• utils.document_saver (structured .txt reports, JSON, encoding)
6. External Services
• Tesseract OCR Engine (local binary)
• OpenAI API (GPT-3.5/4)
1. User triggers “Start Capture” in UI → UI calls core.screen_capture
2. screen_capture grabs image → passes to core.ocr_engine
3. ocr_engine returns raw text → forwarded to gpt.summarizer for live screening notes
4. UI updates real-time checklist and notes
5. At interview end, UI sends full transcript to gpt.enhanced_analyzer
6. enhanced_analyzer returns structured analysis → passed to document_saver
7. document_saver writes report file → UI shows “Save Completed”
c. Patterns & principles
• Layered modularity: UI ↔ core ↔ AI ↔ persistence
• Single Responsibility: each module does one job (capture, OCR, summarization, analysis, saving)
• Dependency inversion: config/settings injected into modules
• Event-driven UI updates via signals/slots
d. Key technologies & frameworks
• PyQt6 for UI
• mss for multi-screen capture
• pytesseract + Pillow for OCR
• OpenAI Python SDK for AI calls
• JSON for templates, .txt for reports