What is Nostr?
shinohai / Shinoa Fores 🧙🏻‍♀️
npub1f0r…m0sa
2025-03-13 01:24:18
in reply to nevent1q…ec58

shinohai on Nostr: Mite be necrothreading here but here goes: ``` #!/bin/bash RED_BOLD='\033[1;31m' ...

Mite be necrothreading here but here goes:

```
#!/bin/bash

RED_BOLD='\033[1;31m'
RESET='\033[0m'

nak req -q -k 1 wss://nos.lol --stream 2>/dev/null | while read -r line; do

pubkey=$(echo "$line" | jq -r '.pubkey')

metadata=$(nak req -k 0 -a "$pubkey" wss://nos.lol 2>/dev/null | head -n 1)

username=$(echo "$metadata" | jq -r '.content | fromjson | .name // .display_name // "'"$pubkey"'"')

time=$(echo "$line" | jq -r '.created_at | todate')
content=$(echo "$line" | jq -r '.content')
printf "\n-------------\n${RED_BOLD}Time:${RESET} %s\n${RED_BOLD}PubKey:${RESET} %s\n${RED_BOLD}Username:${RESET} %s\n${RED_BOLD}Post:${RESET} %s\n" "$time" "$pubkey" "$username" "$content"
done
```
Author Public Key
npub1f0restzwusrck2k62dq2ueelrrfmdfnyk8uhart8n8nqwn94cwwsppm0sa