Migrate all repos into monorepo context folders

Bahn: aisupport, Analyse-O2C-C2S, awesome-bahn-mcp-servers, beam-mcp,
      Confluence_Bot, db-planet-mcp-server, O2C-Harness, project-audit,
      Projekt-KIQ-HP, teamlandkarte-mcp
Dhive: Jury-Voting
Privat: CV, NoteGraph (NOTE: NoteGraph needs complete redo after consolidation)
Shared: AI-Orchestrator, OrgMyLife, power_skills_and_more
Shared/references: symphony (read-only)

Bahn repos remain available as independent remotes - this monorepo
pulls them in via subtree, the originals are untouched.
This commit is contained in:
2026-06-30 20:39:52 +02:00
parent 2f2b295531
commit a5f8fb49ab
1717 changed files with 447332 additions and 0 deletions
@@ -0,0 +1,48 @@
"""OCR extraction for images using pytesseract.
Handles .jpg, .jpeg, .png files. Configured for German + English (deu+eng).
Returns empty text (not error) when OCR cannot extract readable content.
"""
import logging
from pathlib import Path
from .base import ExtractionResult
logger = logging.getLogger(__name__)
SUPPORTED_EXTENSIONS = {".jpg", ".jpeg", ".png"}
class OCRExtractor:
"""Extracts text from images using Tesseract OCR."""
def __init__(self, language: str = "deu+eng"):
self.language = language
def can_handle(self, file_path: Path) -> bool:
"""Return True for .jpg, .jpeg, .png files."""
return file_path.suffix.lower() in SUPPORTED_EXTENSIONS
def extract(self, file_path: Path) -> ExtractionResult:
"""Run OCR on an image file. Returns empty text on failure."""
text = self._run_ocr(file_path)
return ExtractionResult(
text=text,
source_file=file_path,
extraction_method="ocr",
metadata={"ocr_language": self.language},
)
def _run_ocr(self, file_path: Path) -> str:
"""Execute pytesseract on the image. Returns empty string on failure."""
try:
import pytesseract
from PIL import Image
image = Image.open(file_path)
text = pytesseract.image_to_string(image, lang=self.language)
return text.strip()
except Exception as e:
logger.warning("OCR extraction failed for %s: %s", file_path, e)
return ""