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
```
```
#!/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
```