feat: add exporter plugin architecture

This commit is contained in:
Abdessamad Derraz committed 2026-03-29 13:19:38 +02:00
1 parent 2ce8db1754
commit e86d8d68af
4 files changed
+226

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
"""Abstract base class for platform exporters."""
from __future__ import annotations
from abc import ABC, abstractmethod
class BaseExporter(ABC):
"""Base class for exporting truth data to native platform formats."""
@staticmethod
@abstractmethod
def platform_name() -> str:
"""Return the platform identifier this exporter targets."""
@abstractmethod
def export(
self,
truth_data: dict,
output_path: str,
scraped_data: dict | None = None,
) -> None:
"""Export truth data to the native platform format."""
@abstractmethod
def validate(self, truth_data: dict, output_path: str) -> list[str]:
"""Validate exported file against truth data, return list of issues."""