more argparse
This commit is contained in:
parent
beef92408d
commit
9f1ee7cfa4
3 changed files with 42 additions and 27 deletions
|
|
@ -42,22 +42,30 @@ presets:
|
|||
year: "{upload_year}"
|
||||
|
||||
subscriptions:
|
||||
# ALISON:
|
||||
# preset: "soundcloud_with_id3_tags"
|
||||
# soundcloud:
|
||||
# username: alis_on
|
||||
# output_path: "/Users/jesse.bannon/workspace/ytdl_subscribe/alison"
|
||||
# overrides:
|
||||
# artist: "A.L.I.S.O.N."
|
||||
# genre: "Synthwave / Electronic"
|
||||
# delorra:
|
||||
# preset: "soundcloud_with_id3_tags"
|
||||
# soundcloud:
|
||||
# username: delorra
|
||||
# output_path: "/Users/jesse.bannon/workspace/ytdl_subscribe/delorra"
|
||||
# overrides:
|
||||
# artist: "DeLorra"
|
||||
# genre: "Synthwave / Electronic"
|
||||
ALISON:
|
||||
preset: "soundcloud_with_id3_tags"
|
||||
soundcloud:
|
||||
username: alis_on
|
||||
output_path: "/Users/jesse.bannon/workspace/ytdl_subscribe/alison"
|
||||
overrides:
|
||||
artist: "A.L.I.S.O.N."
|
||||
genre: "Synthwave / Electronic"
|
||||
delorra:
|
||||
preset: "soundcloud_with_id3_tags"
|
||||
soundcloud:
|
||||
username: delorra
|
||||
output_path: "/Users/jesse.bannon/workspace/ytdl_subscribe/delorra"
|
||||
overrides:
|
||||
artist: "DeLorra"
|
||||
genre: "Synthwave / Electronic"
|
||||
bl00dwave:
|
||||
preset: "soundcloud_with_id3_tags"
|
||||
soundcloud:
|
||||
username: bl00dwave
|
||||
output_path: "/Users/jesse.bannon/workspace/ytdl_subscribe/bl00dwave"
|
||||
overrides:
|
||||
artist: "bl00dwave"
|
||||
genre: "Synthwave / Electronic"
|
||||
|
||||
tom_petty:
|
||||
youtube:
|
||||
|
|
@ -67,9 +75,9 @@ subscriptions:
|
|||
overrides:
|
||||
artist: "Tom Petty and the Heartbreakers"
|
||||
|
||||
# rammstein:
|
||||
# url: "https://www.youtube.com/playlist?list=PLVTLbc6i-h_iuhdwUfuPDLFLXG2QQnz-x"
|
||||
# preset: "music_videos"
|
||||
# output_path: "rammstein test"
|
||||
# overrides:
|
||||
# artist: "Rammstein"
|
||||
rammstein:
|
||||
url: "https://www.youtube.com/playlist?list=PLVTLbc6i-h_iuhdwUfuPDLFLXG2QQnz-x"
|
||||
preset: "music_videos"
|
||||
output_path: "rammstein test"
|
||||
overrides:
|
||||
artist: "Rammstein"
|
||||
|
|
|
|||
|
|
@ -5,18 +5,26 @@ parser = argparse.ArgumentParser(
|
|||
description="YoutubeDL-Subscribe: Download and organize your favorite media easily."
|
||||
)
|
||||
parser.add_argument(
|
||||
"--config",
|
||||
"-c", "--config",
|
||||
metavar='CONFIGPATH',
|
||||
type=str,
|
||||
help="Path to the config yaml. Will look for subscriptions.yaml in the current directory if not provided",
|
||||
help="path to the config yaml, uses subscriptions.yaml if not provided",
|
||||
default="subscriptions.yaml",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-s", "--subscriptions",
|
||||
metavar='SUB',
|
||||
nargs='+',
|
||||
help='specific subscriptions to download, downloads all if not provided'
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
args = parser.parse_args()
|
||||
|
||||
# execute only if run as a script
|
||||
subscriptions = parse_subscriptions(args.config)
|
||||
if args.subscriptions:
|
||||
subscriptions = [s for s in subscriptions if s.name in args.subscriptions]
|
||||
|
||||
for s in subscriptions:
|
||||
s.extract_info()
|
||||
print("hey")
|
||||
|
|
|
|||
|
|
@ -202,7 +202,6 @@ class SoundcloudSubscription(Subscription):
|
|||
track_ytdl_opts = {
|
||||
"download_archive": self.WORKING_DIRECTORY
|
||||
+ "/ytdl-download-archive.txt",
|
||||
"forcejson": True,
|
||||
}
|
||||
# Get the album tracks first, but do not download. Unfortunately we cannot use download_archive for
|
||||
# this be
|
||||
|
|
|
|||
Loading…
Reference in a new issue