#!/usr/bin/env bash
# Randomized KVK -> global_companies_registry via dexter-sentinel `dexter-scrape` (Rust).
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$ROOT"
if [[ -z "${ATHENA_API_KEY:-}" ]]; then
  echo "Set ATHENA_API_KEY first." >&2
  exit 1
fi
cargo run --release --bin dexter-scrape -- \
  --athena-url="https://cluster.athena-db.com" \
  --athena-key="$ATHENA_API_KEY" \
  --athena-client="dexter" \
  --country-code="NL" \
  --search-engine="kvk" \
  --randomize-query \
  --max-query-length="3"
