What is Nostr?
jb55 / Will
npub1xts…kk5s
2022-04-24 15:18:38
in reply to nevent1q…jake

jb55 on Nostr: nostr-post, a [nostril](https://github.com/jb55/nostril) script to make a post with ...

nostr-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"
```
Author Public Key
npub1xtscya34g58tk0z605fvr788k263gsu6cy9x0mhnm87echrgufzsevkk5s