Further fixes/changes to loading 'types' for config + manifest edits

This commit is contained in:
Patrick Robertson
2025-01-27 11:48:04 +01:00
parent 14e2479599
commit 7fd95866a1
29 changed files with 39 additions and 143 deletions

View File

@@ -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": """

View File

@@ -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}")