How to use the spotdl.handle.get_arguments function in spotdl

To help you get started, we’ve selected a few spotdl examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ritiek / spotify-downloader / test / loader.py View on Github external
def load_defaults():
    const.args = handle.get_arguments(raw_args="", to_group=False, to_merge=False)
    const.args.overwrite = "skip"

    spotdl.args = const.args
    spotdl.log = const.logzero.setup_logger(
        formatter=const._formatter, level=const.args.log_level
    )
github ritiek / spotify-downloader / test / test_handle.py View on Github external
def test_error_m3u_without_list():
    with pytest.raises(SystemExit):
        handle.get_arguments(raw_args=("-s cool song", "--write-m3u"), to_group=True)
github ritiek / spotify-downloader / test / test_handle.py View on Github external
def test_grouped_arguments(tmpdir):
    sys.path[0] = str(tmpdir)
    with pytest.raises(SystemExit):
        handle.get_arguments(to_group=True, to_merge=True)
github ritiek / spotify-downloader / test / test_handle.py View on Github external
def test_m3u_with_list():
    handle.get_arguments(raw_args=("-l cool_list.txt", "--write-m3u"), to_group=True)
github ritiek / spotify-downloader / spotdl / spotdl.py View on Github external
def main():
    const.args = handle.get_arguments()

    internals.filter_path(const.args.folder)
    youtube_tools.set_api_key()
    spotify = spotify_tools.SpotifyAuthorize()

    logzero.setup_default_logger(formatter=const._formatter, level=const.args.log_level)

    try:
        match_args()
        # actually we don't necessarily need this, but yeah...
        # explicit is better than implicit!
        sys.exit(0)

    except KeyboardInterrupt as e:
        log.exception(e)
        sys.exit(3)
github ritiek / spotify-downloader / spotdl / spotdl.py View on Github external
def main():
    const.args = handle.get_arguments()

    internals.filter_path(const.args.folder)
    youtube_tools.set_api_key()

    logzero.setup_default_logger(formatter=const._formatter, level=const.args.log_level)

    try:
        match_args()
        # actually we don't necessarily need this, but yeah...
        # explicit is better than implicit!
        sys.exit(0)

    except KeyboardInterrupt as e:
        log.exception(e)
        sys.exit(3)