A program written in python to autogenerate a playlist in spotify with top tracks for the announced artists at Roskilde Festival 22.
In order to use the program you need to supply some credential through through either
the cli, environmental variables, or a file called creds.json
residing in the src
folder. The three variables that has to be set are CLIENT_ID
, CLIENT_SECRET
, and
REDIRECT_URI
. All of these can be found at
<a href=”https://developer.spotify.com/dashboard/applications/“>https://developer.spotify.com/dashboard/applications/<app_uri>
an example:
{
"client_id":"<client_id>",
"client_secret":"<client_secret>",
"redirect_uri":"https://localhost:8080",
"playlist_uri":"<playlist_uri>"
}
The playlist generated has to be provided as an optional argument or set as an environment variable with ~export PLAYLIST_URI=”<playlist_uri>”~. General usage is:
$ python roskilde_bot.py -h
usage: roskilde_bot.py [-h] [-p [playlist-uri]] [-c [country]] [-n [n-tracks]]
options:
-h, --help show this help message and exit
-p [playlist-uri], --playlist-uri [playlist-uri]
Playlist uri - not necessary if set as env-variable
-c [country], --country [country]
Country to get top tracks from
-n [n-tracks], --n-tracks [n-tracks]
Number of maximum tracks for each artist