rework and extend input file processing (#4732)

- add 2 command-line options to modify input file contents
  - -I/--input-file-comment
  - -x/--input-file-delete
- implement InputManager class
- move code from util.py to __init__.py
  (mainly to avoid import cycles)
This commit is contained in:
Mike Fährmann
2023-11-14 20:38:11 +01:00
parent 17e710c4bf
commit 4700051562
5 changed files with 286 additions and 141 deletions

View File

@@ -6,8 +6,6 @@
## General Options:
-h, --help Print this help message and exit
--version Print program version and exit
-i, --input-file FILE Download URLs found in FILE ('-' for stdin).
More than one --input-file can be specified
-f, --filename FORMAT Filename format string for downloaded files
('/O' for "original" filenames)
-d, --destination PATH Target location for file downloads
@@ -19,6 +17,16 @@
--clear-cache MODULE Delete cached login sessions, cookies, etc. for
MODULE (ALL to delete everything)
## Input Options:
-i, --input-file FILE Download URLs found in FILE ('-' for stdin).
More than one --input-file can be specified
-I, --input-file-comment FILE
Download URLs found in FILE. Comment them out
after they were downloaded successfully.
-x, --input-file-delete FILE
Download URLs found in FILE. Delete them after
they were downloaded successfully.
## Output Options:
-q, --quiet Activate quiet mode
-v, --verbose Print various debugging information