Skip to content

A simple command line tool to back up your Spotify playlists.

License

Notifications You must be signed in to change notification settings

realsuayip/spotify-backup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spotify backup

License: GPL v3

A simple command line tool to back up your Spotify playlists.

Python version

usage: backup.py [-h] [--client_id CLIENT_ID] [--client_secret CLIENT_SECRET] [--filename FILENAME] playlist

Dumps your spotify playlist into a CSV file.
You may get related credentials here:
https://developer.spotify.com/dashboard/applications

positional arguments:
  playlist              Spotify link or ID of the playlist.

options:
  -h, --help            show this help message and exit
  --client_id CLIENT_ID
                        Specify client id from Spotify. If not specified, looks
                        for 'SPOTIFY_CLIENT_ID' environment variable.
  --client_secret CLIENT_SECRET
                        Specify client secret from Spotify. If not specified,
                        looks for 'SPOTIFY_CLIENT_SECRET' environment variable.
  --filename FILENAME   Specify a filename for the backup. Defaults to playlist
                        name with UTC timestamp.

backup.py is PEP 723 compliant, so you can use uv to run it without needing to manage a virtual environment:

uv run backup.py

Rust version

If you need something more portable, you can use Rust to get a binary. To do that, navigate to the spotify-backup directory and run cargo build --release

Dumps your spotify playlist into a CSV file. You may get related credentials here: https://developer.spotify.com/dashboard/applications

Usage: spotify-backup [OPTIONS] <PLAYLIST>

Arguments:
  <PLAYLIST>  Spotify URL or ID of the playlist

Options:
      --client-id <CLIENT_ID>          Specify client id from Spotify. If not specified, looks for 'SPOTIFY_CLIENT_ID' environment variable
      --client-secret <CLIENT_SECRET>  Specify client secret from Spotify. If not specified, looks for 'SPOTIFY_CLIENT_SECRET' environment variable
      --filename <FILENAME>            Specify a filename for the backup. Defaults to playlist id with a UTC timestamp Use '-' for stdout
  -h, --help                           Print help
  -V, --version                        Print version

About

A simple command line tool to back up your Spotify playlists.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published