nostril

A C cli tool for creating nostr events
git clone git://jb55.com/nostril
Log | Files | Refs | Submodules | README | LICENSE

commit 30df00e6faae0753d69f1d2cc0b9a3d76bd34764
parent 74ba45adbc2b018a84050f1f6218c5a784d2cc87
Author: William Casarin <jb55@jb55.com>
Date:   Sun, 22 Sep 2024 10:11:28 +0900

update manpage for --tagn

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
MREADME.md | 3+++
Mdoc/nostril.1 | 73+++++++++++++++++++++++++++++++++++++++----------------------------------
Mshell.nix | 2+-
3 files changed, 43 insertions(+), 35 deletions(-)

diff --git a/README.md b/README.md @@ -42,6 +42,9 @@ nostril - generate nostr events *--tag* <key> <value> Add a tag with a single value +*--tagn* <N> <value \* N ...> + Add a tag with 0 or more elements + *-t* Shorthand for --tag t <hashtag> diff --git a/doc/nostril.1 b/doc/nostril.1 @@ -1,4 +1,4 @@ -.\" Generated by scdoc 1.11.2 +.\" Generated by scdoc 1.11.3 .\" Complete documentation for this program is not available as a GNU info page .ie \n(.g .ds Aq \(aq .el .ds Aq ' @@ -6,87 +6,92 @@ .ad l .\" Begin generated content: .TH "nostril" "1" "1980-01-01" -.P +.PP .SH NAME -.P +.PP nostril - generate nostr events -.P +.PP .SH SYNPOSIS -.P +.PP \fBnostril\fR [OPTIONS.\&.\&.\&] -.P +.PP .SH DESCRIPTION -.P +.PP \fBnostril\fR is a tool that creates and signs nostr events.\& -.P +.PP .SH OPTIONS -.P +.PP \fB--content\fR .RS 4 The text contents of the note -.P +.PP .RE \fB--dm\fR <hex pubkey> .RS 4 Create a direct message.\& This will create a kind-4 note with the contents encrypted> -.P +.PP .RE \fB--envelope\fR .RS 4 Wrap the event with `["EVENT", .\&.\&.\& ]` for easy relaying -.P +.PP .RE \fB--kind\fR <number> .RS 4 Set the kind of the note -.P +.PP .RE \fB--created-at\fR <unix timestamp> .RS 4 Set the created at.\& Optional, this is set automatically.\& -.P +.PP .RE \fB--sec\fR <hex seckey> .RS 4 Set the secret key for signing, otherwise one will be randomly generated.\& -.P +.PP .RE \fB--mine-pubkey\fR .RS 4 Mine a pubkey.\& This may or may not be cryptographically dubious.\& -.P +.PP .RE \fB--pow\fR <difficulty> .RS 4 Number of leading 0 bits of the id the mine for proof-of-work.\& -.P +.PP .RE \fB--tag\fR <key> <value> .RS 4 Add a tag with a single value -.P +.PP +.RE +\fB--tagn\fR <N> <value * N .\&.\&.\&> +.RS 4 +Add a tag with 0 or more elements +.PP .RE \fB-t\fR .RS 4 Shorthand for --tag t <hashtag> -.P +.PP .RE \fB-p\fR .RS 4 Shorthand for --tag p <hex pubkey> -.P +.PP .RE \fB-e\fR .RS 4 Shorthand for --tag e <note id> -.P -.P +.PP +.PP .RE .SH Examples -.P +.PP \fBGenerate an event\fR -.P +.PP .nf .RS 4 $ \&./nostril --sec <key> --content "this is a message" @@ -101,9 +106,9 @@ $ \&./nostril --sec <key> --content "this is a message" } .fi .RE -.P +.PP \fBWrap event to send to a relay\fR -.P +.PP .nf .RS 4 $ \&./nostril --envelope --sec <key> --content "hello" @@ -119,33 +124,33 @@ $ \&./nostril --envelope --sec <key> --content "hello" } ] .fi .RE -.P +.PP \fBSend to a relay\fR -.P +.PP .nf .RS 4 nostril --envelope --sec <key> --content "this is a message" | websocat wss://relay\&.damus\&.io .fi .RE -.P +.PP \fBSend a nip04 DM\fR -.P +.PP .nf .RS 4 nostril --envelope --dm <pubkey> --sec <key> --content "this is a secret" | websocat wss://relay\&.damus\&.io .fi .RE -.P +.PP \fBMine a pubkey\fR -.P +.PP .nf .RS 4 nostril --mine-pubkey --pow <difficulty> .fi .RE -.P +.PP \fBReply to an event.\& nip10 compliant, includes the `thread_id`\fR -.P +.PP .nf .RS 4 \&./nostril --envelope --sec <key> --content "this is reply message" --tag e <thread_id> --tag e <note_id> | websocat wss://relay\&.damus\&.io diff --git a/shell.nix b/shell.nix @@ -1,5 +1,5 @@ { pkgs ? import <nixpkgs> {} }: with pkgs; mkShell { - buildInputs = [ secp256k1 gdb autoreconfHook ]; + buildInputs = [ scdoc ]; }