Update a Spotify playlist based on the library of your shazams that can be downloaded as a csv file from https://www.shazam.com/myshazam
Releases for linux, windows and macOS in the release page https://github.com/cascooscuro/spotyzam/releases
- Register an application at: https://developer.spotify.com/my-applications/
- Use 'http://localhost:8080/callback' as the redirect URI
- In your cmd/shell, set the SPOTIFY_ID environment variable to the client ID you got in step 1.
- set SPOTIFY_ID=your-spotify-client-id (from windows cmd)
- export SPOTIFY_ID=your-spotify-client-id (linux/osx shell)
- Set the SPOTIFY_SECRET environment variable to the client secret from step 1.
- set SPOTIFY_SECRET=your-spotify-client-secret (from windows cmd)
- export SPOTIFY_SECRET=your-spotify-client-secret (linux/osx shell)
- In Spotify, Create a playlist where you want your tracks to be added
- get the ID of that playlist by using the share button.
- The ID is the string that goes after https://open.spotify.com/playlist/
- e.g. in 'https://open.spotify.com/playlist/37i9dQZF1DX6YTj07PjLwE' the id is 37i9dQZF1DX6YTj07PjLwE
- The csv file expects the format used by shazam: Index,TagTime,Title,Artist,URL,TrackKey. First line is skipped.
- Execute: spotyzam playlist-id csv-file.csv
- e.g. C:\Users\user\Document>spotyzam.exe 37i9dQZF1DX6YTj07PjLwE shazamlibrary.csv
- Install golang https://go.dev/doc/install
- Use git to clone the github repo (git clone https://github.com/cascooscuro/spotyzam.git) or just download the code from https://github.com/cascooscuro/spotyzam/archive/refs/heads/main.zip and unzip it
- in the directory where you have spotyzam.go do "go mod init spotyzam" and after that "go mod tidy"
- Finally, to compile it: "go build spotyzam.go"
- You should have now a binary "spotyzam" in your folder. Youn can run it by doing "./spotyzam" or "spotyzam.exe", depending on your OS
- follow the instructions to create the spotify application and playlist and set the environment variable to run it