diff --git a/README.md b/README.md index 21d3876..8fbb023 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,9 @@ nostril - generate nostr events *--tag* Add a tag with a single value +*--tagn* + Add a tag with 0 or more elements + *-t* Shorthand for --tag t diff --git a/doc/nostril.1 b/doc/nostril.1 index 9d69e8b..5076ca9 100644 --- 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 .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 .RS 4 Set the kind of the note -.P +.PP .RE \fB--created-at\fR .RS 4 Set the created at.\& Optional, this is set automatically.\& -.P +.PP .RE \fB--sec\fR .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 .RS 4 Number of leading 0 bits of the id the mine for proof-of-work.\& -.P +.PP .RE \fB--tag\fR .RS 4 Add a tag with a single value -.P +.PP +.RE +\fB--tagn\fR +.RS 4 +Add a tag with 0 or more elements +.PP .RE \fB-t\fR .RS 4 Shorthand for --tag t -.P +.PP .RE \fB-p\fR .RS 4 Shorthand for --tag p -.P +.PP .RE \fB-e\fR .RS 4 Shorthand for --tag e -.P -.P +.PP +.PP .RE .SH Examples -.P +.PP \fBGenerate an event\fR -.P +.PP .nf .RS 4 $ \&./nostril --sec --content "this is a message" @@ -101,9 +106,9 @@ $ \&./nostril --sec --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 --content "hello" @@ -119,33 +124,33 @@ $ \&./nostril --envelope --sec --content "hello" } ] .fi .RE -.P +.PP \fBSend to a relay\fR -.P +.PP .nf .RS 4 nostril --envelope --sec --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 --sec --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 .fi .RE -.P +.PP \fBReply to an event.\& nip10 compliant, includes the `thread_id`\fR -.P +.PP .nf .RS 4 \&./nostril --envelope --sec --content "this is reply message" --tag e --tag e | websocat wss://relay\&.damus\&.io diff --git a/shell.nix b/shell.nix index e9e3d79..db134c4 100644 --- a/shell.nix +++ b/shell.nix @@ -1,5 +1,5 @@ { pkgs ? import {} }: with pkgs; mkShell { - buildInputs = [ secp256k1 gdb autoreconfHook ]; + buildInputs = [ scdoc ]; }