Publish your liked songs from Spotify to GitHub as JSON
Someone asked me what I listen to, and it turns out Spotify doesn't allow sharing your full list of liked songs. So I made this thing. It utilizes the OAuth flows of GitHub and Spotify to publish a playlist.json file in the root of a default branch of a chosen GitHub repo.
- python3
- A GitHub app with a classic personal access token, permission to read and write a repo's contents, and a callback URL of
http://localhost:9000/github-callback.html - A Spotify app with a redirect URI of
http://localhost:9000/spotify-callback.html
$ GITHUB_CLIENT_SECRET=whatever python3 -m http.server --cgi 9000
Then visit http://localhost:9000/
https://github.com/danrashid/playlist/blob/master/playlist.json is generated by this application. https://www.danrashid.com/playlist/ renders it.