black, argparse
This commit is contained in:
parent
e318a6aaff
commit
beef92408d
1 changed files with 13 additions and 2 deletions
|
|
@ -1,11 +1,22 @@
|
||||||
|
import argparse
|
||||||
from ytdl_subscribe.parse import parse_subscriptions
|
from ytdl_subscribe.parse import parse_subscriptions
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(description="Process some integers.")
|
parser = argparse.ArgumentParser(
|
||||||
|
description="YoutubeDL-Subscribe: Download and organize your favorite media easily."
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--config",
|
||||||
|
type=str,
|
||||||
|
help="Path to the config yaml. Will look for subscriptions.yaml in the current directory if not provided",
|
||||||
|
default="subscriptions.yaml",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
# execute only if run as a script
|
# execute only if run as a script
|
||||||
subscriptions = parse_subscriptions("subscriptions.yaml")
|
subscriptions = parse_subscriptions(args.config)
|
||||||
for s in subscriptions:
|
for s in subscriptions:
|
||||||
s.extract_info()
|
s.extract_info()
|
||||||
print("hey")
|
print("hey")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue