From 7fd95866a1681d80d58f55815637d2cf7d863f28 Mon Sep 17 00:00:00 2001 From: Patrick Robertson Date: Mon, 27 Jan 2025 11:48:04 +0100 Subject: [PATCH] Further fixes/changes to loading 'types' for config + manifest edits --- src/auto_archiver/base_processors/database.py | 7 ----- src/auto_archiver/base_processors/enricher.py | 9 ------ src/auto_archiver/base_processors/feeder.py | 8 ----- src/auto_archiver/core/config.py | 8 ++--- src/auto_archiver/core/orchestrator.py | 8 ++--- .../modules/cli_feeder/__manifest__.py | 2 ++ .../modules/cli_feeder/cli_feeder.py | 6 ---- .../modules/console_db/console_db.py | 5 ---- .../modules/csv_db/__manifest__.py | 1 + src/auto_archiver/modules/csv_db/csv_db.py | 7 ----- .../modules/csv_feeder/__manifest__.py | 2 ++ .../modules/generic_extractor/__manifest__.py | 2 +- .../modules/gsheet_feeder/__manifest__.py | 2 +- .../modules/hash_enricher/__manifest__.py | 5 +++- .../modules/hash_enricher/hash_enricher.py | 30 ------------------- .../modules/html_formatter/html_formatter.py | 20 ++++++------- .../modules/local_storage/__init__.py | 2 +- .../{local.py => local_storage.py} | 7 +++-- .../modules/meta_enricher/meta_enricher.py | 6 ---- .../metadata_enricher/metadata_enricher.py | 5 ---- .../modules/mute_formatter/__manifest__.py | 4 +-- .../modules/mute_formatter/mute_formatter.py | 8 ++--- .../pdq_hash_enricher/pdq_hash_enricher.py | 5 ---- .../modules/s3_storage/__manifest__.py | 2 +- .../modules/ssl_enricher/__manifest__.py | 1 + .../modules/ssl_enricher/ssl_enricher.py | 5 ---- .../telegram_extractor/telegram_extractor.py | 5 ---- .../telethon_extractor/__manifest__.py | 3 +- .../thumbnail_enricher/thumbnail_enricher.py | 7 ----- 29 files changed, 39 insertions(+), 143 deletions(-) rename src/auto_archiver/modules/local_storage/{local.py => local_storage.py} (86%) diff --git a/src/auto_archiver/base_processors/database.py b/src/auto_archiver/base_processors/database.py index 28f0061..6f13208 100644 --- a/src/auto_archiver/base_processors/database.py +++ b/src/auto_archiver/base_processors/database.py @@ -10,13 +10,6 @@ from auto_archiver.core import Metadata, Step class Database(Step, ABC): name = "database" - def __init__(self, config: dict) -> None: - # without this STEP.__init__ is not called - super().__init__(config) - - def init(name: str, config: dict) -> Database: - # only for typing... - return Step.init(name, config, Database) def started(self, item: Metadata) -> None: """signals the DB that the given item archival has started""" diff --git a/src/auto_archiver/base_processors/enricher.py b/src/auto_archiver/base_processors/enricher.py index d26eedf..3cc1a29 100644 --- a/src/auto_archiver/base_processors/enricher.py +++ b/src/auto_archiver/base_processors/enricher.py @@ -18,14 +18,5 @@ class Enricher(Step, ABC): """Base classes and utilities for enrichers in the Auto-Archiver system.""" name = "enricher" - def __init__(self, config: dict) -> None: - # without this STEP.__init__ is not called - super().__init__(config) - - - # only for typing... - def init(name: str, config: dict) -> Enricher: - return Step.init(name, config, Enricher) - @abstractmethod def enrich(self, to_enrich: Metadata) -> None: pass diff --git a/src/auto_archiver/base_processors/feeder.py b/src/auto_archiver/base_processors/feeder.py index 7fbd6b1..0ff541e 100644 --- a/src/auto_archiver/base_processors/feeder.py +++ b/src/auto_archiver/base_processors/feeder.py @@ -9,13 +9,5 @@ from auto_archiver.core import Step class Feeder(Step): name = "feeder" - def __init__(self, config: dict) -> None: - # without this STEP.__init__ is not called - super().__init__(config) - - def init(name: str, config: dict) -> Feeder: - # only for code typing - return Step.init(name, config, Feeder) - @abstractmethod def __iter__(self) -> Metadata: return None \ No newline at end of file diff --git a/src/auto_archiver/core/config.py b/src/auto_archiver/core/config.py index 24f6a61..fd5d49b 100644 --- a/src/auto_archiver/core/config.py +++ b/src/auto_archiver/core/config.py @@ -6,16 +6,12 @@ flexible setup in various environments. """ import argparse -from ruamel.yaml import YAML, CommentedMap -from ruamel.yaml.comments import CommentedMap +from ruamel.yaml import YAML, CommentedMap, add_representer -from dataclasses import dataclass, field -from collections import OrderedDict -from collections.abc import Iterable from copy import deepcopy from .loader import MODULE_TYPES -from typing import Any, List +from typing import Any, List, Type # configurable_parents = [ # Feeder, diff --git a/src/auto_archiver/core/orchestrator.py b/src/auto_archiver/core/orchestrator.py index 5daa857..2419b03 100644 --- a/src/auto_archiver/core/orchestrator.py +++ b/src/auto_archiver/core/orchestrator.py @@ -152,12 +152,12 @@ class ArchivingOrchestrator: if not modules: modules = available_modules(with_manifest=True) + module: Module for module in modules: if not module.configs: # this module has no configs, don't show anything in the help # (TODO: do we want to show something about this module though, like a description?) continue - group = parser.add_argument_group(module.display_name or module.name, f"{module.description[:100]}...") for name, kwargs in module.configs.items(): # TODO: go through all the manifests and make sure we're not breaking anything with removing cli_set @@ -165,8 +165,8 @@ class ArchivingOrchestrator: kwargs.pop('cli_set', None) kwargs['dest'] = f"{module.name}.{kwargs.pop('dest', name)}" try: - kwargs['type'] = getattr(__builtins__, kwargs.get('type', 'str')) - except AttributeError: + kwargs['type'] = __builtins__.get(kwargs.get('type'), str) + except KeyError: kwargs['type'] = getattr(validators, kwargs['type']) group.add_argument(f"--{module.name}.{name}", **kwargs) @@ -207,7 +207,7 @@ class ArchivingOrchestrator: exit() if (module_type == 'feeder' or module_type == 'formatter') and len(step_items) > 1: - logger.error(f"Only one feeder is allowed, found {len(step_items)} {module_type}s. Please remove one of the following from your configuration file: {modules_to_load}") + logger.error(f"Only one {module_type} is allowed, found {len(step_items)} {module_type}s. Please remove one of the following from your configuration file: {modules_to_load}") exit() for i, module in enumerate(modules_to_load): diff --git a/src/auto_archiver/modules/cli_feeder/__manifest__.py b/src/auto_archiver/modules/cli_feeder/__manifest__.py index febebd0..1769a60 100644 --- a/src/auto_archiver/modules/cli_feeder/__manifest__.py +++ b/src/auto_archiver/modules/cli_feeder/__manifest__.py @@ -5,10 +5,12 @@ "external_dependencies": { "python": ["loguru"], }, + 'entry_point': 'cli_feeder::CLIFeeder', "configs": { "urls": { "default": None, "help": "URL(s) to archive, either a single URL or a list of urls, should not come from config.yaml", + "nargs": "+", }, }, "description": """ diff --git a/src/auto_archiver/modules/cli_feeder/cli_feeder.py b/src/auto_archiver/modules/cli_feeder/cli_feeder.py index 7d0d01f..c5f3b23 100644 --- a/src/auto_archiver/modules/cli_feeder/cli_feeder.py +++ b/src/auto_archiver/modules/cli_feeder/cli_feeder.py @@ -7,12 +7,6 @@ from auto_archiver.core import Metadata, ArchivingContext class CLIFeeder(Feeder): name = "cli_feeder" - def __init__(self, config: dict) -> None: - # without this STEP.__init__ is not called - super().__init__(config) - if type(self.urls) != list or len(self.urls) == 0: - raise Exception("CLI Feeder did not receive any URL to process") - def __iter__(self) -> Metadata: for url in self.urls: logger.debug(f"Processing {url}") diff --git a/src/auto_archiver/modules/console_db/console_db.py b/src/auto_archiver/modules/console_db/console_db.py index 9dfeb2c..c581552 100644 --- a/src/auto_archiver/modules/console_db/console_db.py +++ b/src/auto_archiver/modules/console_db/console_db.py @@ -8,11 +8,6 @@ class ConsoleDb(Database): """ Outputs results to the console """ - name = "console_db" - - def __init__(self, config: dict) -> None: - # without this STEP.__init__ is not called - super().__init__(config) def started(self, item: Metadata) -> None: logger.warning(f"STARTED {item}") diff --git a/src/auto_archiver/modules/csv_db/__manifest__.py b/src/auto_archiver/modules/csv_db/__manifest__.py index 1fe2d7d..d97d179 100644 --- a/src/auto_archiver/modules/csv_db/__manifest__.py +++ b/src/auto_archiver/modules/csv_db/__manifest__.py @@ -4,6 +4,7 @@ "requires_setup": False, "external_dependencies": {"python": ["loguru"] }, + 'entry_point': 'csv_db::CSVDb', "configs": { "csv_file": {"default": "db.csv", "help": "CSV file name"} }, diff --git a/src/auto_archiver/modules/csv_db/csv_db.py b/src/auto_archiver/modules/csv_db/csv_db.py index eec4ec6..189b137 100644 --- a/src/auto_archiver/modules/csv_db/csv_db.py +++ b/src/auto_archiver/modules/csv_db/csv_db.py @@ -11,13 +11,6 @@ class CSVDb(Database): """ Outputs results to a CSV file """ - name = "csv_db" - - def __init__(self, config: dict) -> None: - # without this STEP.__init__ is not called - super().__init__(config) - self.assert_valid_string("csv_file") - def done(self, item: Metadata, cached: bool=False) -> None: """archival result ready - should be saved to DB""" diff --git a/src/auto_archiver/modules/csv_feeder/__manifest__.py b/src/auto_archiver/modules/csv_feeder/__manifest__.py index 4d19b70..81c4dcd 100644 --- a/src/auto_archiver/modules/csv_feeder/__manifest__.py +++ b/src/auto_archiver/modules/csv_feeder/__manifest__.py @@ -6,6 +6,8 @@ "python": ["loguru"], "bin": [""] }, + 'requires_setup': True, + 'entry_point': "csv_feeder::CSVFeeder", "configs": { "files": { "default": None, diff --git a/src/auto_archiver/modules/generic_extractor/__manifest__.py b/src/auto_archiver/modules/generic_extractor/__manifest__.py index f46c13c..73c264d 100644 --- a/src/auto_archiver/modules/generic_extractor/__manifest__.py +++ b/src/auto_archiver/modules/generic_extractor/__manifest__.py @@ -2,7 +2,7 @@ 'name': 'Generic Extractor', 'version': '0.1.0', 'author': 'Bellingcat', - 'type': ['extractor', 'feeder', 'enricher'], + 'type': ['extractor'], 'requires_setup': False, 'dependencies': { 'python': ['yt_dlp', 'requests', 'loguru', 'slugify'], diff --git a/src/auto_archiver/modules/gsheet_feeder/__manifest__.py b/src/auto_archiver/modules/gsheet_feeder/__manifest__.py index 685a8fd..e1a89a2 100644 --- a/src/auto_archiver/modules/gsheet_feeder/__manifest__.py +++ b/src/auto_archiver/modules/gsheet_feeder/__manifest__.py @@ -1,7 +1,7 @@ { "name": "Google Sheets Feeder", "type": ["feeder"], - "entry_point": "GsheetsFeeder", + "entry_point": "gsheet_feeder::GsheetsFeeder", "requires_setup": True, "external_dependencies": { "python": ["loguru", "gspread", "python-slugify"], diff --git a/src/auto_archiver/modules/hash_enricher/__manifest__.py b/src/auto_archiver/modules/hash_enricher/__manifest__.py index a7697b9..6e3cde3 100644 --- a/src/auto_archiver/modules/hash_enricher/__manifest__.py +++ b/src/auto_archiver/modules/hash_enricher/__manifest__.py @@ -8,7 +8,10 @@ "configs": { "algorithm": {"default": "SHA-256", "help": "hash algorithm to use", "choices": ["SHA-256", "SHA3-512"]}, # TODO add non-negative requirement to match previous implementation? - "chunksize": {"default": 1.6e7, "help": "number of bytes to use when reading files in chunks (if this value is too large you will run out of RAM), default is 16MB"}, + "chunksize": {"default": 1.6e7, + "help": "number of bytes to use when reading files in chunks (if this value is too large you will run out of RAM), default is 16MB", + 'type': 'positive_number', + }, }, "description": """ Generates cryptographic hashes for media files to ensure data integrity and authenticity. diff --git a/src/auto_archiver/modules/hash_enricher/hash_enricher.py b/src/auto_archiver/modules/hash_enricher/hash_enricher.py index 8731b06..39ec75c 100644 --- a/src/auto_archiver/modules/hash_enricher/hash_enricher.py +++ b/src/auto_archiver/modules/hash_enricher/hash_enricher.py @@ -18,36 +18,6 @@ class HashEnricher(Enricher): """ Calculates hashes for Media instances """ - name = "hash_enricher" - - def __init__(self, config: dict) -> None: - # without this STEP.__init__ is not called - super().__init__(config) - algos = self.configs()["algorithm"] - algo_choices = algos["choices"] - if not getattr(self, 'algorithm', None): - if not config.get('algorithm'): - logger.warning(f"No hash algorithm selected, defaulting to {algos['default']}") - self.algorithm = algos["default"] - else: - self.algorithm = config["algorithm"] - - assert self.algorithm in algo_choices, f"Invalid hash algorithm selected, must be one of {algo_choices} (you selected {self.algorithm})." - - if not getattr(self, 'chunksize', None): - if config.get('chunksize'): - self.chunksize = config["chunksize"] - else: - self.chunksize = self.configs()["chunksize"]["default"] - - try: - self.chunksize = int(self.chunksize) - except ValueError: - raise ValueError(f"Invalid chunksize value: {self.chunksize}. Must be an integer.") - - assert self.chunksize >= -1, "read length must be non-negative or -1" - - ArchivingContext.set("hash_enricher.algorithm", self.algorithm, keep_on_reset=True) def enrich(self, to_enrich: Metadata) -> None: url = to_enrich.get_url() diff --git a/src/auto_archiver/modules/html_formatter/html_formatter.py b/src/auto_archiver/modules/html_formatter/html_formatter.py index 15104b2..afa367b 100644 --- a/src/auto_archiver/modules/html_formatter/html_formatter.py +++ b/src/auto_archiver/modules/html_formatter/html_formatter.py @@ -16,17 +16,17 @@ from auto_archiver.utils.misc import random_str @dataclass class HtmlFormatter(Formatter): - name = "html_formatter" - def __init__(self, config: dict) -> None: - # without this STEP.__init__ is not called - super().__init__(config) - self.environment = Environment(loader=FileSystemLoader(os.path.join(pathlib.Path(__file__).parent.resolve(), "templates/")), autoescape=True) - # JinjaHelper class static methods are added as filters - self.environment.filters.update({ - k: v.__func__ for k, v in JinjaHelpers.__dict__.items() if isinstance(v, staticmethod) - }) - self.template = self.environment.get_template("html_template.html") + # TODO: fix setting up template with new config method + # def __init__(self, config: dict) -> None: + # # without this STEP.__init__ is not called + # super().__init__(config) + # self.environment = Environment(loader=FileSystemLoader(os.path.join(pathlib.Path(__file__).parent.resolve(), "templates/")), autoescape=True) + # # JinjaHelper class static methods are added as filters + # self.environment.filters.update({ + # k: v.__func__ for k, v in JinjaHelpers.__dict__.items() if isinstance(v, staticmethod) + # }) + # self.template = self.environment.get_template("html_template.html") def format(self, item: Metadata) -> Media: url = item.get_url() diff --git a/src/auto_archiver/modules/local_storage/__init__.py b/src/auto_archiver/modules/local_storage/__init__.py index 6746373..d23147d 100644 --- a/src/auto_archiver/modules/local_storage/__init__.py +++ b/src/auto_archiver/modules/local_storage/__init__.py @@ -1 +1 @@ -from .local import LocalStorage \ No newline at end of file +from .local_storage import LocalStorage \ No newline at end of file diff --git a/src/auto_archiver/modules/local_storage/local.py b/src/auto_archiver/modules/local_storage/local_storage.py similarity index 86% rename from src/auto_archiver/modules/local_storage/local.py rename to src/auto_archiver/modules/local_storage/local_storage.py index 530f111..5d65414 100644 --- a/src/auto_archiver/modules/local_storage/local.py +++ b/src/auto_archiver/modules/local_storage/local_storage.py @@ -11,9 +11,10 @@ from auto_archiver.base_processors import Storage class LocalStorage(Storage): name = "local_storage" - def __init__(self, config: dict) -> None: - super().__init__(config) - os.makedirs(self.save_to, exist_ok=True) + def __init__(self) -> None: + super().__init__() + # TODO: fix up passing config values to 'steps' + # os.makedirs(self.save_to, exist_ok=True) def get_cdn_url(self, media: Media) -> str: # TODO: is this viable with Storage.configs on path/filename? diff --git a/src/auto_archiver/modules/meta_enricher/meta_enricher.py b/src/auto_archiver/modules/meta_enricher/meta_enricher.py index f9b74f7..fa86818 100644 --- a/src/auto_archiver/modules/meta_enricher/meta_enricher.py +++ b/src/auto_archiver/modules/meta_enricher/meta_enricher.py @@ -10,12 +10,6 @@ class MetaEnricher(Enricher): """ Adds metadata information about the archive operations, to be included at the end of all enrichments """ - name = "meta_enricher" - - - def __init__(self, config: dict) -> None: - # without this STEP.__init__ is not called - super().__init__(config) def enrich(self, to_enrich: Metadata) -> None: url = to_enrich.get_url() diff --git a/src/auto_archiver/modules/metadata_enricher/metadata_enricher.py b/src/auto_archiver/modules/metadata_enricher/metadata_enricher.py index cb68b98..20a278f 100644 --- a/src/auto_archiver/modules/metadata_enricher/metadata_enricher.py +++ b/src/auto_archiver/modules/metadata_enricher/metadata_enricher.py @@ -10,11 +10,6 @@ class MetadataEnricher(Enricher): """ Extracts metadata information from files using exiftool. """ - name = "metadata_enricher" - - def __init__(self, config: dict) -> None: - # without this STEP.__init__ is not called - super().__init__(config) def enrich(self, to_enrich: Metadata) -> None: diff --git a/src/auto_archiver/modules/mute_formatter/__manifest__.py b/src/auto_archiver/modules/mute_formatter/__manifest__.py index af3f83a..77f2784 100644 --- a/src/auto_archiver/modules/mute_formatter/__manifest__.py +++ b/src/auto_archiver/modules/mute_formatter/__manifest__.py @@ -1,7 +1,7 @@ -m = { +{ "name": "Mute Formatter", "type": ["formatter"], - "requires_setup": False, + "requires_setup": True, "external_dependencies": { }, "description": """ Default formatter. diff --git a/src/auto_archiver/modules/mute_formatter/mute_formatter.py b/src/auto_archiver/modules/mute_formatter/mute_formatter.py index 19830b1..addb454 100644 --- a/src/auto_archiver/modules/mute_formatter/mute_formatter.py +++ b/src/auto_archiver/modules/mute_formatter/mute_formatter.py @@ -1,16 +1,12 @@ from __future__ import annotations from dataclasses import dataclass -from ..core import Metadata, Media -from . import Formatter +from auto_archiver.core import Metadata, Media +from auto_archiver.base_processors 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 diff --git a/src/auto_archiver/modules/pdq_hash_enricher/pdq_hash_enricher.py b/src/auto_archiver/modules/pdq_hash_enricher/pdq_hash_enricher.py index 7e3f467..65b0e59 100644 --- a/src/auto_archiver/modules/pdq_hash_enricher/pdq_hash_enricher.py +++ b/src/auto_archiver/modules/pdq_hash_enricher/pdq_hash_enricher.py @@ -25,11 +25,6 @@ class PdqHashEnricher(Enricher): Calculates perceptual hashes for Media instances using PDQ, allowing for (near-)duplicate detection. Ideally this enrichment is orchestrated to run after the thumbnail_enricher. """ - name = "pdq_hash_enricher" - - def __init__(self, config: dict) -> None: - # Without this STEP.__init__ is not called - super().__init__(config) def enrich(self, to_enrich: Metadata) -> None: url = to_enrich.get_url() diff --git a/src/auto_archiver/modules/s3_storage/__manifest__.py b/src/auto_archiver/modules/s3_storage/__manifest__.py index fc41eb3..811c703 100644 --- a/src/auto_archiver/modules/s3_storage/__manifest__.py +++ b/src/auto_archiver/modules/s3_storage/__manifest__.py @@ -20,7 +20,7 @@ "region": {"default": None, "help": "S3 region name"}, "key": {"default": None, "help": "S3 API key"}, "secret": {"default": None, "help": "S3 API secret"}, - "random_no_duplicate": {"default": False, "help": f"if set, it will override `path_generator`, `filename_generator` and `folder`. It will check if the file already exists and if so it will not upload it again. Creates a new root folder path `{NO_DUPLICATES_FOLDER}`"}, + "random_no_duplicate": {"default": False, "help": "if set, it will override `path_generator`, `filename_generator` and `folder`. It will check if the file already exists and if so it will not upload it again. Creates a new root folder path `no-dups/`"}, "endpoint_url": { "default": 'https://{region}.digitaloceanspaces.com', "help": "S3 bucket endpoint, {region} are inserted at runtime" diff --git a/src/auto_archiver/modules/ssl_enricher/__manifest__.py b/src/auto_archiver/modules/ssl_enricher/__manifest__.py index f44fc94..ccde957 100644 --- a/src/auto_archiver/modules/ssl_enricher/__manifest__.py +++ b/src/auto_archiver/modules/ssl_enricher/__manifest__.py @@ -5,6 +5,7 @@ "external_dependencies": { "python": ["loguru", "python-slugify"], }, + 'entry_point': 'ssl_enricher::SSLEnricher', "configs": { "skip_when_nothing_archived": {"default": True, "help": "if true, will skip enriching when no media is archived"}, }, diff --git a/src/auto_archiver/modules/ssl_enricher/ssl_enricher.py b/src/auto_archiver/modules/ssl_enricher/ssl_enricher.py index 965f699..d15ee95 100644 --- a/src/auto_archiver/modules/ssl_enricher/ssl_enricher.py +++ b/src/auto_archiver/modules/ssl_enricher/ssl_enricher.py @@ -11,11 +11,6 @@ class SSLEnricher(Enricher): """ Retrieves SSL certificate information for a domain, as a file """ - name = "ssl_enricher" - - def __init__(self, config: dict) -> None: - super().__init__(config) - self.skip_when_nothing_archived = bool(self.skip_when_nothing_archived) def enrich(self, to_enrich: Metadata) -> None: if not to_enrich.media and self.skip_when_nothing_archived: return diff --git a/src/auto_archiver/modules/telegram_extractor/telegram_extractor.py b/src/auto_archiver/modules/telegram_extractor/telegram_extractor.py index 31bdaca..aa7e46f 100644 --- a/src/auto_archiver/modules/telegram_extractor/telegram_extractor.py +++ b/src/auto_archiver/modules/telegram_extractor/telegram_extractor.py @@ -11,11 +11,6 @@ class TelegramExtractor(Extractor): Extractor for telegram that does not require login, but the telethon_extractor is much more advised, will only return if at least one image or one video is found """ - name = "telegram_extractor" - - def __init__(self, config: dict) -> None: - super().__init__(config) - def download(self, item: Metadata) -> Metadata: url = item.get_url() diff --git a/src/auto_archiver/modules/telethon_extractor/__manifest__.py b/src/auto_archiver/modules/telethon_extractor/__manifest__.py index 5d71fdd..2cf1e42 100644 --- a/src/auto_archiver/modules/telethon_extractor/__manifest__.py +++ b/src/auto_archiver/modules/telethon_extractor/__manifest__.py @@ -1,4 +1,3 @@ -import json { "name": "telethon_extractor", "type": ["extractor"], @@ -42,4 +41,4 @@ To use the `TelethonExtractor`, you must configure the following: - **Channel Invites**: Optional, specify a JSON string of invite links to join channels during setup. """ -} +} \ No newline at end of file diff --git a/src/auto_archiver/modules/thumbnail_enricher/thumbnail_enricher.py b/src/auto_archiver/modules/thumbnail_enricher/thumbnail_enricher.py index 8c34502..4a5a1db 100644 --- a/src/auto_archiver/modules/thumbnail_enricher/thumbnail_enricher.py +++ b/src/auto_archiver/modules/thumbnail_enricher/thumbnail_enricher.py @@ -18,13 +18,6 @@ class ThumbnailEnricher(Enricher): """ Generates thumbnails for all the media """ - name = "thumbnail_enricher" - - def __init__(self, config: dict) -> None: - # without this STEP.__init__ is not called - super().__init__(config) - self.thumbnails_per_second = int(self.thumbnails_per_minute) / 60 - self.max_thumbnails = int(self.max_thumbnails) def enrich(self, to_enrich: Metadata) -> None: """