mirror of
https://github.com/THIS-IS-NOT-A-BACKUP/zspotify.git
synced 2025-07-01 15:23:15 +00:00
34 lines
1.4 KiB
Python
34 lines
1.4 KiB
Python
import argparse
|
|
|
|
from app import client
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
parser = argparse.ArgumentParser(prog='zspotify', description='A Spotify downloader needing only a python interpreter and ffmpeg.')
|
|
parser.add_argument('-ns', '--no-splash',
|
|
action='store_true',
|
|
help='Suppress the splash screen when loading.')
|
|
group = parser.add_mutually_exclusive_group(required=True)
|
|
group.add_argument('url',
|
|
type=str,
|
|
default='',
|
|
nargs='?',
|
|
help='Downloads the track, album, playlist or podcast episode specified as a command line argument. If an artist url is given, all albums by specified artist will be downloaded.')
|
|
group.add_argument('-ls', '--liked-songs',
|
|
dest='liked_songs',
|
|
action='store_true',
|
|
help='Downloads all the liked songs from your account.')
|
|
group.add_argument('-p', '--playlist',
|
|
action='store_true',
|
|
help='Downloads a saved playlist from your account.')
|
|
group.add_argument('-s', '--search',
|
|
dest='search_spotify',
|
|
action='store_true',
|
|
help='Loads search prompt to find then download a specific track, album or playlist')
|
|
|
|
parser.set_defaults(func=client)
|
|
|
|
args = parser.parse_args()
|
|
args.func(args)
|