Skip to content

Instantly share code, notes, and snippets.

@IngwiePhoenix
Created June 10, 2024 23:19
Show Gist options
  • Save IngwiePhoenix/4af8d64111e6b644b10ef41ebf3efada to your computer and use it in GitHub Desktop.
Save IngwiePhoenix/4af8d64111e6b644b10ef41ebf3efada to your computer and use it in GitHub Desktop.
Kills a nostr note, hopefuly.
#!/bin/sh -x
# Install fiatjaf/nak (go), htmlq (rust) and jq (go) first.
# Set these
NSEC=
NEVENT=
del_notes() {
P=$(mktemp)
curl "$1" | jq -r '. | join("\n")' > $P
while read line; do
nak event -k 5 -e $NEVENT --sec $NSEC "$line" &
done < $P
wait
}
del_xport() {
P=$(mktemp)
curl https://relays.xport.top | htmlq -t "body > main > table > tbody > tr > td:nth-child(1)" > $P
while read line; do
nak event -k 5 -e $NEVENT --sec $NSEC "$line" &
done < $P
wait
}
del_notes "https://api.nostr.watch/v1/nip/5"
del_notes "https://api.nostr.watch/v1/nip/1"
del_notes "https://api.nostr.watch/v1/public"
del_notes "https://api.nostr.watch/v1/online"
del_xport
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment