From b46169cfd24f41732fec9aa5bf75bbf298d85be0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Tue, 27 Aug 2024 17:21:49 +0200 Subject: [PATCH] add 'input-files' config option (#6059) --- docs/configuration.rst | 10 ++++++++++ gallery_dl/__init__.py | 7 +++++++ 2 files changed, 17 insertions(+) diff --git a/docs/configuration.rst b/docs/configuration.rst index eb52f1b4..7fed4eb7 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -6330,6 +6330,16 @@ Description operation to be ``Rold#new#`` instead of the default ``Rold/new/`` +input-files +----------- +Type + ``list`` of |Path|_ +Example + ``["~/urls.txt", "$HOME/input"]`` +Description + Additional# input files. + + signals-ignore -------------- Type diff --git a/gallery_dl/__init__.py b/gallery_dl/__init__.py index 4b39c15a..663fe994 100644 --- a/gallery_dl/__init__.py +++ b/gallery_dl/__init__.py @@ -238,6 +238,13 @@ def main(): return config.open_extern() else: + input_files = config.get((), "input-files") + if input_files: + for input_file in input_files: + if isinstance(input_file, str): + input_file = (input_file, None) + args.input_files.append(input_file) + if not args.urls and not args.input_files: parser.error( "The following arguments are required: URL\n"