A command-line tool written in Go that allows users to quickly create a Spotify playlist from songs stored locally (.mp3, .wav, .flac, etc.)
I made this because I had way too many songs on my old computer, adding them to a playlist manually would take forever. Also, I wanted to learn Go and with this I got to play around with it and the Spotify Web API.
Thanks to the Go wrapper for the Spotify Web API by zmb3.
-
Create a app on Spotify's developer dashboard.
-
Add
http://localhost:3000/callback
in Redirect URIs in the edit settings of the app. -
Create
.env
and fill in your app id and secret (.env.example
for reference). -
Run
go run main.go path/to/music
Song must be in the format [Artist] - [Track] e.g. "Post Malone - Money Made Me Do It"
To add more file extensions, add them to the
allowedExtensions
in trackparser.go
demo: