playlog: every Spotify play in a SQLite file
I wanted a weekly log of the albums I listen to, and I found out that the Spotify API only gives you your last 50 plays. You can ask Spotify for your full history, but the export takes days to arrive, and the day after you get it it’s already old.
So I wrote playlog, a small Go CLI that checks my recently played songs every few minutes and saves the new ones in a sqlite file.
go install github.com/gravityblast/playlog@latest
playlog login --client-id <your Spotify app client id>
playlog run --interval 15m
It’s a single binary, and you can run it easily in background with playlog run.
Since other people in my family use my account, I also added a way to ignore artists and playlists without deleting anything,
and an import command that loads the Spotify export, so now my history goes back to 2013.
playlog guide and playlog schema print the docs and the tables, so you can also ask an LLM to query the database for you.
All of this is what keeps my Playlog up to date.
happy hacking.