aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/PluginInterface.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/app/PluginInterface.py b/app/PluginInterface.py
index 6bc5513..23d76f8 100644
--- a/app/PluginInterface.py
+++ b/app/PluginInterface.py
@@ -7,10 +7,17 @@ Params: TypeAlias = dict[str, str]
class PluginInterface(ABC):
- def __init__(self, id: str, params: Params):
+ name: str
+
+ def __init__(self, plugin_type: str, id: str, params: Params):
+ self.plugin_type = plugin_type
self.id = id
self.params = params
+ self.log_prefix = f"[{self.plugin_type}#{self.id}]"
+
+ def log(self, msg) -> None:
+ print(f"{self.log_prefix} {msg}")
@abstractmethod
def process(self, source_id: str | None, items: list[Item]) -> list[Item]:
- pass
+ return NotImplemented