plexus.input_sources.TextFileInputSource module
- class plexus.input_sources.TextFileInputSource.TextFileInputSource(pattern: str = None, **options)
Bases:
InputSourceExtracts raw text from a file attachment matching a pattern.
- Args:
pattern: Regex pattern to match attachments (used by file-based sources) **options: Additional source-specific options
- extract(item) Score.Input
Find and return Score.Input with text from matching attachment.
- Args:
item: Item with attachedFiles
- Returns:
Score.Input with text content from file
- Raises:
ValueError: If no matching attachment found Exception: If file download or parsing fails