spotkov

command module
v0.0.0-...-6ebd40e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2017 License: GPL-3.0 Imports: 12 Imported by: 0

README

Build Status

Spotkov

A command line tool to generate a Spotify playlist of songs you might like together using your Last.FM scrobbling history and a Markov chain.

$GOPATH/bin/spotkov -help

Installation

Clone the repository and install Go or if you have Go already, enter go get github.com/snyderks/spotkov. You'll also need API keys for the Spotify and Last.FM web API. Set environment variables (on UNIX, refer to this article (the process is identical on macOS), on Windows, edit your user environment variables at Control Panel -> System -> Advanced System Settings -> Environment Variables...)

  • SPOTIFY_ID: your Spotify API key
  • SPOTIFY_SECRET: your Spotify API secret key
  • LASTFM_KEY: your Last.FM API key
  • LASTFM_SECRET: (optional) your Last.FM secret key (currently not used by the application)

None of the above environment variables are stored by the application. The application makes no network requests to servers other than Last.fm and Spotify.

This tool works best with Redis for caching, but isn't necessary. A local instance listening on localhost:6379 is the default, but the environment variable REDIS_URL (same name as what Heroku uses) can also be set.

If you'd rather use a config file, check out the configRead package for the format.


Why would this give good recommendations?

Beyond the idea of how Markov chains work, Spotkov using the Last.FM scrobber list as training is effective because the scrobble only takes place around 50% through the song, which means that songs you skipped or couldn't get through probably shouldn't be recommended, and since Last.FM doesn't store them Spotkov won't see it as options.

Spotkov doesn't repeat any song in its playlist and prevents multiple songs by the same artist from appearing in a row.

How can I get it to give better recommendations?

Try to listen with purpose. If you throw playlists on shuffle and never skip, Spotkov will most likely give you more of the same (which you might want!). Even a few skips helps enormously with determining what songs you like together.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package configRead reads configuration information from either a JSON file or from static environment variables as a fallback.
Package configRead reads configuration information from either a JSON file or from static environment variables as a fallback.
Package lastFm handles the retrieval of song data from Last.FM.
Package lastFm handles the retrieval of song data from Last.FM.
Package tools holds various utility functions that can be used for multiple purposes as well as constant values to be used elsewhere in the application.
Package tools holds various utility functions that can be used for multiple purposes as well as constant values to be used elsewhere in the application.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL