notepad on Nostr: Hey #[0], here's the nostr-post snippet: #[1]
Hey jb55 (npub1xts…kk5s), here's the nostr-post snippet:
quoting nevent1q…drganostr-post, a [nostril](https://github.com/jb55/nostril) script to make a post with your EDITOR
```bash
#!/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"
```