From 042a9da4515f15ae41fdfc9b0dab83f10edb4190 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Fri, 8 Dec 2023 17:29:54 +0100 Subject: [PATCH] add 'output.errorfile' config option --- docs/configuration.rst | 15 +++++++++++++++ gallery_dl/__init__.py | 6 ++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/docs/configuration.rst b/docs/configuration.rst index 546ab189..6e5820c1 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -4408,6 +4408,21 @@ Description The default format string here is ``"{message}"``. +output.errorfile +---------------- +Type + |Path|_ +Description + File to write input URLs which returned an error to. + + When combined with + ``-I``/``--input-file-comment`` or + ``-x``/``--input-file-delete``, + this option will cause all input URLs from these files + to be commented/deleted after processing them + and not just successful ones. + + output.num-to-str ----------------- Type diff --git a/gallery_dl/__init__.py b/gallery_dl/__init__.py index 0f9d1cae..1ec0de6a 100644 --- a/gallery_dl/__init__.py +++ b/gallery_dl/__init__.py @@ -249,8 +249,10 @@ def main(): input_log.error(exc) return getattr(exc, "code", 128) - if args.error_file: - input_manager.error_file(args.error_file) + error_file = (args.error_file or + config.get(("output",), "errorfile")) + if error_file: + input_manager.error_file(error_file) pformat = config.get(("output",), "progress", True) if pformat and len(input_manager.urls) > 1 and \