Skip to content

Latest commit

 

History

History
24 lines (13 loc) · 1.08 KB

README.md

File metadata and controls

24 lines (13 loc) · 1.08 KB

toSpotify

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.

Getting Started

  1. Create a app on Spotify's developer dashboard.

  2. Add http://localhost:3000/callback in Redirect URIs in the edit settings of the app.

  3. Create .env and fill in your app id and secret (.env.example for reference).

  4. 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:

demo