from .xml_processor import XMLTaskProcessor from .csv_processor import CSVTaskProcessor def get_file_processor(global_config): """ Factory function to get the appropriate file processor class based on the file type in the global configuration. """ file_type = global_config.file_type.lower() if file_type == "xml": return XMLTaskProcessor elif file_type == "csv": return CSVTaskProcessor else: raise ValueError(f"Unsupported file type: {file_type}")