Kaneli (cinnamon in Finnish) is a command line program that adds songs from Jouluradio's playlist to a user chosen Spotify playlist.
- Install golang
- Create new application in Spotify developer dashboard. Define
http://localhost:4321
as the callback URL. - Copy the app client id and secret from the Spotify developer UI. Define following env variables:
export SPOTIFY_CLIENT_ID=xxx
export SPOTIFY_CLIENT_SECRET=xxx
-
In the Spotify desktop UI: create a new playlist (or use an existing playlist.) Copy the Spotify URI for the playlist (e.g.
spotify:playlist:5x5mdsVit4ngNyvglqkO8f
). -
Run the app by giving the playlist id (without the
spotify:playlist:
part) as command line argument:go run . 5x5mdsVit4ngNyvglqkO8f christmas
-
The app will open browser for Spotify authentication. Log in and give app permission to modify your playlists.
-
Bunch of random Christmas songs are added to your chosen playlist:
go run . 5x5mdsVit4ngNyvglqkO8f 2020/11/27 21:55:53 http: Server closed ... Add track Oscar Peterson: God Rest Ye Merry, Gentlemen Add track Sister Rosetta Tharpe: O Little Town Of Bethlehem Add track Dianne Reeves: Jingle Bells Sleeping a while... ... All done! Merry Christmas! Hyvää joulua! https://open.spotify.com/playlist/5x5mdsVit4ngNyvglqkO8f
-
Start listening and find new favourite Christmas tunes 🎄!