publish nostr note from note.txt

1
2
3
4
5
6
function notep(){
  p=$(cat ~/.config/nostr/config.json | jq -r .privatekey)
  relays=$(noscl relay | grep -oP "^wss://[^:]+" | while read r; do echo -r $r; done)
  tags=$(cat note.txt | grep -oP "#\S+" | while read t; do echo "-t t|${t:1}"; done)
  nostr-tool -p $p $relays custom-event --kind 1 $tags -c "$(cat note.txt)"
}
Edit

Pub: 24 Nov 2023 14:28 UTC

Edit: 24 Nov 2023 14:40 UTC

Views: 76