Use these quick and easy python scripts to create your own version of the well-known music guessing game 'Hitster'! Note that I am not affiliated with the company in any way, this is my own personal and fun project.
By running the scripts and generating a CSV file (or Excel worksheet) with a playlist of your choice, you can import the CSV (or worksheet) into an editing software (Adobe InDesign) to create the music cards of your own design!
- Before running any scripts, you need to create an environment file
client.envwith your Spotify id and secret. These can be created and fetched from Spotify's API for developers.
export SPOTIPY_CLIENT_ID='id'
export SPOTIPY_CLIENT_SECRET='secret'
- Edit the following line in
Tracklist_to_csv.py(alt.Tracklist_to_xlsx) by adding the URI of a playlist of your choice and run the script:
playlist_uri = 'spotify:playlist:<URI_HERE>' # Add the URI of a playlist-
After the intial tracklist file
test_tracks.csvhas been generated, runSpotify_to_qr.pyto generate a directory with QR code images and a new CSV file with a corresponding QR_code path for each track. -
Import the QR codes and CSV files into an editing software such as Adobe InDesign and create your own music cards. Or use it for something completely different.
-
Enjoy the laborious task of printing out the cards and cutting them out indvidiually. Alternatively, use a machine to cut it out for you.
-
Play the game and enjoy!
Note that Hitster's mobile application will not be able to scan the QR codes of any cards you generate from these scripts, since they are not official cards. Therefore, I have been looking into deploying an application that is able to scan the cards and run the track by itself.
It is however possible to scan the codes from almost any phone camera and the songs should play automatically, given that Spotify is installed on the phone. There is, as such, no urgency to develop this application.