#!/bin/sh # fail fast if file is missing [ ! -f tags_for_deletion.txt ] && { echo "Error: tags_for_deletion.txt not found." exit 1 } while IFS= read -r tag || [ -n "$tag" ]; do # skip empty lines or comments [ -z "$tag" ] && continue echo "Purging: https://ponerpics.org/tags/$tag" curl "https://ponerpics.org/tags/$tag" \ -s \ -o /dev/null \ -X POST \ -H 'User-Agent: Serial cURLer' \ -H 'Cookie: user_remember_me=[login token]' --data-raw '_method=delete&_csrf_token=[csrf token]' done < tags_for_deletion.txt