Merge branch 'jb55:master' into master

This commit is contained in:
Michael Henke 2023-09-28 09:47:48 -07:00 committed by GitHub
commit d331a0359b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 25 additions and 1 deletions

View File

@ -11,7 +11,7 @@ all: nostril docs
docs: doc/nostril.1
doc/nostril.1: README.txt
doc/nostril.1: README.md
scdoc < $^ > $@
version: nostril.c

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

@ -7,3 +7,15 @@ $ make
# Optional - install to system PATH
$ sudo make install
######################
Ubuntu
------
$ sudo apt install libtool make automake
$ make
# Optional - install to system PATH
$ sudo make install

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)]