mirror of
https://github.com/bellingcat/auto-archiver.git
synced 2026-06-11 12:48:28 +03:00
WIP refactor logic
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
# we need to explicitly expose the available imports here
|
||||
from .gworksheet import *
|
||||
from .misc import *
|
||||
from .misc import *
|
||||
from .util import Util
|
||||
20
src/utils/util.py
Normal file
20
src/utils/util.py
Normal file
@@ -0,0 +1,20 @@
|
||||
from __future__ import annotations
|
||||
from dataclasses import dataclass
|
||||
from abc import abstractmethod, ABC
|
||||
from metadata import Metadata
|
||||
from step import Step
|
||||
|
||||
@dataclass
|
||||
class Util(Step, ABC):
|
||||
name = "util"
|
||||
|
||||
def __init__(self, config: dict) -> None:
|
||||
Step.__init__(self)
|
||||
|
||||
|
||||
# only for typing...
|
||||
def init(name: str, config: dict) -> Util:
|
||||
return super().init(name, config, Util)
|
||||
|
||||
@abstractmethod
|
||||
def enrich(self, item: Metadata) -> Metadata: pass
|
||||
Reference in New Issue
Block a user