Basic working script

Updated the gitnore for media files.
This commit is contained in:
20xd6
2023-09-13 18:36:48 -04:00
parent 5b279bc957
commit 5ce6f618ac
4 changed files with 51 additions and 0 deletions
Executable
+18
View File
@@ -0,0 +1,18 @@
#!/usr/bin/env python3
import argparse
import download
script_version = "0.2"
help_epilog = ("This script is very dependent on yt-dlp.\n"+
"If it's not working properly try updating yt-dlp.")
cmd_option_set = argparse.ArgumentParser(description='Backup YouTube channels.', epilog=help_epilog)
cmd_option_set.add_argument('--version', '-v', dest='print_version', action='store_true', help='Print the current version number.')
cmd_option_set.add_argument(dest='url_to_convert', help="The URL of the YouTube video you're converting to a local mp3.")
cmd_options = cmd_option_set.parse_args()
if (cmd_options.print_version):
print("Version: " + script_version)
else:
download.get(cmd_options.url_to_convert)