feat: group private apps into andreknie-privat

This commit is contained in:
2026-07-25 15:47:01 +02:00
parent 4c7d48ae6d
commit 2e83750cb7
109 changed files with 0 additions and 0 deletions
@@ -0,0 +1,27 @@
"""Base protocol and data structures for text extraction."""
from dataclasses import dataclass, field
from pathlib import Path
from typing import Any, Protocol
@dataclass
class ExtractionResult:
"""Result of extracting text from a document."""
text: str
source_file: Path
extraction_method: str # "direct", "ocr", "mixed"
metadata: dict[str, Any] = field(default_factory=dict)
class TextExtractor(Protocol):
"""Protocol that all text extractors must implement."""
def can_handle(self, file_path: Path) -> bool:
"""Return True if this extractor can process the given file."""
...
def extract(self, file_path: Path) -> ExtractionResult:
"""Extract text content from the file."""
...