🎧 Get your last weeks listening report from Spotify in a GitHub Gist.
Update a gist to contain your monthly plays on Spotify
📌✨ For more pinned-gist projects like this one, check out: https://github.com/matchai/awesome-pinned-gists
This code was heavily inspired by @jacc music-box.
- Create a new public GitHub Gist (https://gist.github.com/)
- Create a Spotify Application (https://developer.spotify.com/dashboard/)
- Add your own user to the app under
users and access
- Add
http://localhost
as valoid Redirect URIs underedit settings
- Copy the
Client ID
andClient Secret
- Create a github personal access token here with gist permissions
- Download this repo (or just copy the contents of this file
- Run
pip install spotipy, PyGithub
- Export all the needed env variables and run the file
- GIST_ID: The ID portion from your gist url
https://gist.github.com/<github username>/
6d5f84419863089a167387da62dd7081
. - GITHUB_ACCESS_TOKEN: The GitHub token generated above.
- SPOTIPY_CLIENT_ID: The client id you got while creating the Spotify app.
- SPOTIPY_CLIENT_SECRET: The client secret you got while creating the Spotify app.