The /rocks page renders public/data/listening.json — Matt's Last.fm listening history as an interactive terminal rock formation.
- Generate the base data (no network) Parses a Last.fm "Top Tracks" .xlsx export into per-artist track counts:
npm i -D xlsx # already in devDependencies node scripts/generate-listening.mjs ./path/to/Last.fm_Export.xlsx Writes public/data/listening.json with the top 300 artists (top 120 carry sample tracks), genre: null, hue: null, and edges: []. The page renders fine in this state — you get the green rock pile, just no genre connection trails yet.
- Enrich with genres + related-artist links (Last.fm API) Run locally (the Last.fm API is blocked in CI). Get a free API key at https://www.last.fm/api/account/create:
LASTFM_API_KEY=your_key node scripts/enrich-listening.mjs For the top ~200 artists it pulls artist.getTopTags (→ primary genre + hue) and artist.getSimilar (→ undirected edges between artists that are both in Matt's library). Counts and sample tracks are left untouched. Commit the rewritten listening.json to ship the trails.
Test the trails without a key LASTFM_API_KEY=FAKE node scripts/enrich-listening.mjs Mock mode deterministically assigns genres and synthesizes same-genre edges so you can verify the glow trails + attractive forces end-to-end. Do not commit mock output — the genres are fake.