Skip to content

lauravuo/kaneli

Repository files navigation

kaneli

codecov

Kaneli (cinnamon in Finnish) is a command line program that adds songs from Jouluradio's playlist to a user chosen Spotify playlist.

Setup

  1. Install golang
  2. Create new application in Spotify developer dashboard. Define http://localhost:4321 as the callback URL.
  3. 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

Usage

  1. 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).

  2. Run the app by giving the playlist id (without the spotify:playlist: part) as command line argument:

    go run . 5x5mdsVit4ngNyvglqkO8f christmas
  3. The app will open browser for Spotify authentication. Log in and give app permission to modify your playlists.

  4. 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
  5. Start listening and find new favourite Christmas tunes 🎄!