mirror of
https://github.com/bellingcat/auto-archiver.git
synced 2026-06-12 05:08:28 +03:00
mute formatter and docker
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
from .formatter import Formatter
|
||||
from .html_formatter import HtmlFormatter
|
||||
from .html_formatter import HtmlFormatter
|
||||
from .mute_formatter import MuteFormatter
|
||||
@@ -1,8 +1,7 @@
|
||||
from __future__ import annotations
|
||||
from dataclasses import dataclass
|
||||
from abc import abstractmethod
|
||||
from ..core import Metadata
|
||||
from ..core import Step
|
||||
from ..core import Metadata, Media, Step
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -18,4 +17,4 @@ class Formatter(Step):
|
||||
return Step.init(name, config, Formatter)
|
||||
|
||||
@abstractmethod
|
||||
def format(self, item) -> Metadata: return None
|
||||
def format(self, item: Metadata) -> Media: return None
|
||||
@@ -1,6 +1,5 @@
|
||||
from __future__ import annotations
|
||||
from dataclasses import dataclass
|
||||
from abc import abstractmethod
|
||||
import mimetypes
|
||||
from jinja2 import Environment, FileSystemLoader
|
||||
import uuid, os, pathlib
|
||||
|
||||
15
src/auto_archiver/formatters/mute_formatter.py
Normal file
15
src/auto_archiver/formatters/mute_formatter.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from __future__ import annotations
|
||||
from dataclasses import dataclass
|
||||
from ..core import Metadata, Media
|
||||
from . import Formatter
|
||||
|
||||
|
||||
@dataclass
|
||||
class MuteFormatter(Formatter):
|
||||
name = "mute_formatter"
|
||||
|
||||
def __init__(self, config: dict) -> None:
|
||||
# without this STEP.__init__ is not called
|
||||
super().__init__(config)
|
||||
|
||||
def format(self, item: Metadata) -> Media: return None
|
||||
Reference in New Issue
Block a user