feat(api): OCR réel — POST /ocr/jobs + GET /ocr/jobs/:id (tesseract syscall, jobs asynchrones)
- ocr/tesseract.go : Engine → Tesseract subprocess (OCR_LANG fra+eng) ; PDF → calque texte via ledongthuc/pdf (go.mod : nouveau dep) - repository/ocr_jobs.go : queued→processing→done/failed, scoping device, text/error NULLIFés - service/ocr.go : Create valide le fichier (GetFile), queue + goroutine de traitement ; physique résolu par glob UPLOAD_DIR/<device>/<id>.* ; fail propre (fichier illisible, erreur moteur) - handlers/ocr.go : réels (validate fileId, NOT_FOUND si job d'un autre device), fin 501 OCR - tests end-to-end : cycle queued→done (stub moteur), NOT_FOUND fichier inconnu, scoping device - smoke réel : PNG 'VAULTDROP' → job done text='VAULTDROP' (tesseract installé) - docs/AGENTS : §5 + état des routes (tout V1 réel)
This commit is contained in:
@@ -25,6 +25,7 @@ require (
|
||||
github.com/goccy/go-yaml v1.19.2 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
|
||||
github.com/ledongthuc/pdf v0.0.0-20260907135840-6c8c28e0e8a0 // indirect
|
||||
github.com/leodido/go-urn v1.4.0 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
|
||||
Reference in New Issue
Block a user