npm install
Create a .env
file based off of .env.example
. Set the following fields:
APP_CLIENT_ID=<Spotify Application ID>
APP_CLIENT_SECRET=<Spotify Application Secret>
APP_LOGIN_URI=<Login Uri (http://localhost:3000/login)>
APP_REDIRECT_URI=<Redirect Uri (http://localhost:3000/callback)>
CLIENT_USERNAME=<Your Spotify Login>
CLIENT_PASSWORD=<Your Spotify Password>
npm run start
This runs node src/index.js
which:
- Kicks off a server
- Spins up puppeteer to authenticate with Spotify's OAuth2
- Once it has the token ensures both Top 100 Albums and Top 100 Singles playlists exist for authenticated user
- Loads everything spotify tags as
new
- Filters out albums and singles to those released from last last Saturday to last Friday
- Sorts albums and singles by popularity
- Replaces playlist tracks with tracks from newly filtered/sorted albums and singles