feat: add exporter plugin architecture

This commit is contained in:
Abdessamad Derraz
2026-03-29 13:19:38 +02:00
parent 2ce8db1754
commit e86d8d68af
4 changed files with 226 additions and 0 deletions

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."""