begin cli dl functionality. Upgrade to python3.10
This commit is contained in:
parent
21e8e6fa51
commit
688c6361bf
5 changed files with 16 additions and 4 deletions
|
|
@ -2,6 +2,6 @@ argparse==1.4.0
|
||||||
dicttoxml==1.7.4
|
dicttoxml==1.7.4
|
||||||
mergedeep==1.3.4
|
mergedeep==1.3.4
|
||||||
music-tag==0.4.3
|
music-tag==0.4.3
|
||||||
Pillow==8.3.2
|
Pillow==9.1.0
|
||||||
PyYAML==6.0
|
PyYAML==6.0
|
||||||
yt-dlp==2022.4.8
|
yt-dlp==2022.4.8
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
-r requirements.txt
|
-r requirements.txt
|
||||||
black==21.11b1
|
black==22.3.0
|
||||||
coverage==6.3.2
|
coverage==6.3.2
|
||||||
isort==5.10.1
|
isort==5.10.1
|
||||||
pylint==2.13.3
|
pylint==2.13.5
|
||||||
pytest==7.1.1
|
pytest==7.1.1
|
||||||
0
ytdl_subscribe/cli/__init__.py
Normal file
0
ytdl_subscribe/cli/__init__.py
Normal file
12
ytdl_subscribe/cli/subscription_args_parser.py
Normal file
12
ytdl_subscribe/cli/subscription_args_parser.py
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
from typing import List
|
||||||
|
|
||||||
|
|
||||||
|
class SubscriptionArgsParser:
|
||||||
|
"""
|
||||||
|
'Unknown' arguments can be given to `ytdl-sub dl` which are meant to represent fields
|
||||||
|
in a subscription yaml. This class will convert those extra args into a
|
||||||
|
:class:`~ytdl_subscribe.validators.config.preset_validator.PresetValidator`
|
||||||
|
"""
|
||||||
|
|
||||||
|
def __init__(self, unknown_arguments: List[str]):
|
||||||
|
self._unknown_arguments = unknown_arguments
|
||||||
|
|
@ -38,7 +38,7 @@ download_parser.add_argument(
|
||||||
)
|
)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
args = parser.parse_args()
|
args, unknown = parser.parse_known_args()
|
||||||
|
|
||||||
config: ConfigFileValidator = ConfigFileValidator.from_file_path(args.config)
|
config: ConfigFileValidator = ConfigFileValidator.from_file_path(args.config)
|
||||||
if args.subparser == "sub":
|
if args.subparser == "sub":
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue