# rti-scripts

a place to share useful tools and scripts related to real time insights

# dependencies

    npm install
    git submodule update --recursive --init
    git submodule foreach npm ci

# run the entire project

    $EDITOR ama-frontend/.env.local # fill in env vars
    podman-compose up --detach

# rti-scripts commandline client

    npm link

# scripts

## get tracks about to cross a milestone

    DELPHI_API_CLIENT_ID=CLIENT_ID \
    DELPHI_API_CLIENT_SECRET=CLIENT_SECRET \
      npm run milestones [artistLimit #]

## start a new aws session (needed for some other scripts)

    npm run aws-set-session-token \
      developer-at-gdb-infra-dev \
      flastname-at-gdb-infra-dev \
      2FACODE

## delphi cli client

    export DELPHI_API_URL= DELPHI_API_CLIENT_ID= DELPHI_API_CLIENT_SECRET= 
    npm run delphi [ISRC|GRAS_ID]                # guess the most useful information for lookup

    npm run delphi isrcToArtistId ISRC           # get artistId from ISRC
    npm run delphi nameToArtistId someArtistName # get artistId from someArtistName
    npm run delphi isrcToTrackNane ISRC          # get the name of a track from ISRC
    npm run delphi grasIdToArtistName GRAS_ID    # get the name of an artist from GRAS_ID
    npm run delphi isrcToArtistName ISRC         # get the name of an artist from ISRC
    npm run delphi ENDPOINT '.some.jq.selector'  # arbitrary get requests

## trigger a fake notification from your last favorited track

    ENVIRONMENT=local npm run trigger-notification [--upload-to-s3] # uses minio
