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
|
||||||
|
|
||||||
usage: nostril [OPTIONS] --content <content>
|
usage: nostril [OPTIONS]
|
||||||
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
|
|
||||||
|
--content the content of the note
|
||||||
--dm <hex pubkey> make an encrypted dm to said pubkey. sets kind and tags.
|
--dm <hex pubkey> make an encrypted dm to said pubkey. sets kind and tags.
|
||||||
--envelope wrap in ["EVENT",...] for easy relaying
|
--envelope wrap in ["EVENT",...] for easy relaying
|
||||||
--kind <number> set kind
|
--kind <number> set kind
|
||||||
|
|
|
@ -69,10 +69,11 @@ struct nostr_event {
|
||||||
|
|
||||||
void usage()
|
void usage()
|
||||||
{
|
{
|
||||||
printf("usage: nostril [OPTIONS] --content <content>\n");
|
printf("usage: nostril [OPTIONS]\n");
|
||||||
printf("\n");
|
printf("\n");
|
||||||
printf(" OPTIONS\n");
|
printf(" OPTIONS\n");
|
||||||
printf("\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(" --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(" --envelope wrap in [\"EVENT\",...] for easy relaying\n");
|
||||||
printf(" --kind <number> set kind\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) {
|
if (!args->content)
|
||||||
fprintf(stderr, "expected --content\n");
|
args->content = "";
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user