Compare commits

...

2 Commits

Author SHA1 Message Date
Daniel Dương 8726ad3b15 Add --sec to the documentation
Closes: https://github.com/jb55/nostril/pull/32
2023-08-08 14:07:06 -07:00
William Casarin d657ccdf84 add replacable list param to nostril-query 2023-08-08 14:07:06 -07:00
3 changed files with 12 additions and 0 deletions

View File

@ -30,6 +30,9 @@ nostril - generate nostr events
*--created-at* <unix timestamp>
Set the created at. Optional, this is set automatically.
*--sec* <hex seckey>
Set the secret key for signing, otherwise one will be randomly generated.
*--mine-pubkey*
Mine a pubkey. This may or may not be cryptographically dubious.

View File

@ -47,6 +47,11 @@ Set the kind of the note
Set the created at.\& Optional, this is set automatically.\&
.P
.RE
\fB--sec\fR <hex seckey>
.RS 4
Set the secret key for signing, otherwise one will be randomly generated.\&
.P
.RE
\fB--mine-pubkey\fR
.RS 4
Mine a pubkey.\& This may or may not be cryptographically dubious.\&

View File

@ -8,6 +8,7 @@ parser = argparse.ArgumentParser(prog = 'nostril-query', description = 'Construc
parser.add_argument('-a', '--authors')
parser.add_argument('-p', '--mentions')
parser.add_argument('-e', '--references')
parser.add_argument('-d', '--parameter')
parser.add_argument('-t', '--hashtag')
parser.add_argument('-i', '--ids')
parser.add_argument('-k', '--kinds')
@ -48,6 +49,9 @@ if args.mentions is not None:
if args.references is not None:
filt["#e"] = args.references.split(",")
if args.parameter is not None:
filt["#d"] = args.parameter.split(",")
if args.kinds is not None:
kinds = args.kinds.split(",")
filt["kinds"] = [a for a in map(lambda s: int(s), kinds)]