mirror of https://github.com/jb55/nostril.git
add some handy script
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
parent
19f90b4e22
commit
7a01bc0cf7
|
@ -0,0 +1,2 @@
|
|||
#!/usr/bin/env bash
|
||||
echo '["REQ","",{"kinds":[0],"authors":["'$1'"]}]'
|
|
@ -0,0 +1,29 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
TMP=$(mktemp)
|
||||
|
||||
$EDITOR "$TMP"
|
||||
|
||||
if [ ! -f "$TMP" ]; then
|
||||
printf "could not create temporary file\n" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
content="$(cat $TMP)"
|
||||
|
||||
re="^[[:space:]]*$"
|
||||
if [[ "$content" =~ $re ]]; then
|
||||
printf "note empty. aborting.\n" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
note=$(nostril "$@" --content "$content")
|
||||
|
||||
printf "relaying:\n" >&2
|
||||
printf "$note\n"
|
||||
<<<"$note" nostr-relay-note
|
||||
printf "done.\n" >&2
|
||||
|
||||
rm -f "$TMP"
|
|
@ -0,0 +1,2 @@
|
|||
#!/usr/bin/env bash
|
||||
websocat "$@" wss://nostr-pub.wellorder.net
|
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
jq -c '["EVENT",.]' | websocat wss://nostr-pub.wellorder.net
|
Loading…
Reference in New Issue