# `backfill-spotify-artist-key-poc`

## Setup

```sh
curl -fsSL https://bun.com/install | bash
bun install
```

### Environment

Copy either the QA or prod shadow file to create your local `.env`:

```sh
cp .env.qa.shadow .env
cp .env.prod.shadow .env
```

### AWS Access

Authenticate with AWS using [awsume](https://www.notion.so/AWS-Access-f841b9dd815d4443a80e96a86c92cd2f) before running the CLI:

```sh
awsume prod
```

## Usage

### Run

In order to use this script, export the [Spotify Artist Profile Protection Google Sheet](https://docs.google.com/spreadsheets/d/1IY1qcmS8pdQXwaXeBvBuBfywNeN92wE0qukRQVNC4FI/edit?gid=817664069#gid=817664069) as an XLSX file (File > Download > Microsoft Excel .xslx) and save in the root directory as `sheet.xlsx`.

Then run the script:
```sh
bun run index.ts
```

This will overwrite all `spotifyArtistKey` values for the provided `vendorId` + `name` pair for those that match in the spreadsheet, so be careful.


### Testing/Linting/Formatting

```sh
bun test:unit
```

```sh
bun fmt
```

```sh
bun lint
```
