plexus.input_sources.TextFileInputSource module

class plexus.input_sources.TextFileInputSource.TextFileInputSource(pattern: str = None, **options)

Bases: InputSource

Extracts 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, default_text: str) str

Find and return text from matching attachment.

Args:

item: Item with attachedFiles default_text: Not used (kept for interface compatibility)

Returns:

Text content from file

Raises:

ValueError: If no matching attachment found Exception: If file download or parsing fails