Skip to content

Commit

Permalink
add 'input-files' config option (#6059)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Aug 27, 2024
1 parent eef5beb commit b46169c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions gallery_dl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit b46169c

Please sign in to comment.