mirror of
https://github.com/jb55/nostril.git
synced 2024-11-21 16:29:06 -05:00
make content optional, defaults to ""
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
parent
f4d4835e1e
commit
54fd3e0fe3
|
@ -5,10 +5,11 @@ A cli util for creating nostr events
|
|||
|
||||
## Usage
|
||||
|
||||
usage: nostril [OPTIONS] --content <content>
|
||||
usage: nostril [OPTIONS]
|
||||
|
||||
OPTIONS
|
||||
|
||||
--content the content of the note
|
||||
--dm <hex pubkey> make an encrypted dm to said pubkey. sets kind and tags.
|
||||
--envelope wrap in ["EVENT",...] for easy relaying
|
||||
--kind <number> set kind
|
||||
|
|
|
@ -69,10 +69,11 @@ struct nostr_event {
|
|||
|
||||
void usage()
|
||||
{
|
||||
printf("usage: nostril [OPTIONS] --content <content>\n");
|
||||
printf("usage: nostril [OPTIONS]\n");
|
||||
printf("\n");
|
||||
printf(" OPTIONS\n");
|
||||
printf("\n");
|
||||
printf(" --content <string> the content of the note\n");
|
||||
printf(" --dm <hex pubkey> make an encrypted dm to said pubkey. sets kind and tags.\n");
|
||||
printf(" --envelope wrap in [\"EVENT\",...] for easy relaying\n");
|
||||
printf(" --kind <number> set kind\n");
|
||||
|
@ -476,10 +477,8 @@ static int parse_args(int argc, const char *argv[], struct args *args, struct no
|
|||
}
|
||||
}
|
||||
|
||||
if (!args->content) {
|
||||
fprintf(stderr, "expected --content\n");
|
||||
return 0;
|
||||
}
|
||||
if (!args->content)
|
||||
args->content = "";
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user