#!/bin/bash APP="" SECRET="" BACKEND="" # This script should be run on your bitch repository after a sync # Get token to work on the API token=$(curl $BACKEND/login -H "Content-type: application/json" -d "{\"app\":\"$APP\",\"secret\":\"$SECRET\"}' | jq -r .token) # Add the rejected urls while read url; do curl $BACKEND/images -H "Authorization: Bearer $token" -H "Content-type: application/json" -d "{\"url\": \"$url\", \"status\": \"unavailable\", \"tags\": [\"sleeping\", \"2girl\"]}" echo "" done