No description
- Go 100%
| .gitignore | ||
| config.toml.example | ||
| go.mod | ||
| go.sum | ||
| json.go | ||
| LICENSE | ||
| main.go | ||
| README.md | ||
| spotify.go | ||
Usage
- Create a Spotify app. Note the ID and secret provided in your application dashboard.
- Copy
config.toml.exampletoconfig.toml. Editconfig.tomland set your ID and secret. Make sure that they are enclosed by quotation marks, TOML is strict about denoting that these values are strings. - Run the code. This can be done from source by running
go run .in the root of the repository or by building a binary withgo build .. The binary accepts one argument,-dest, which is the name of the CSV file your liked tracks will be written to. - The application will print out a URL of the form
https://accounts.spotify.com/authorize?access_type=offline&client_id=CLIENT_ID&code_challenge=CODE_CHALLENGE&code_challenge_method=S256&redirect_uri=https://yourappurl.com/callback/&response_type=code&scope=user-library-read&state=state. - Copy this URL and open it in a browser. You will be asked to authenticate with Spotify and allow the application access to your account. The only scope requested is
user-library-readso it cannot make any changes to your account or library. - After allowing the application access, you'll be redirected to a new page. The URL will look like
https://likedumper.ndumas.com/callback?code=AUTH_CODE&state=state. Copy the value of thecodeURL parameter, everything after the=and before&state. - Paste this code into the terminal.
- The application will iterate through your Liked tracks and write them to a CSV file, either
tracks.csvor the filename you provided with the-destflag.