mirror of
https://github.com/jb55/nostril.git
synced 2024-11-21 16:29:06 -05:00
nostril-query: add kinds
This commit is contained in:
parent
f4325e89f5
commit
0aaf9eb263
3
Makefile
3
Makefile
|
@ -24,8 +24,8 @@ dist: docs version
|
|||
cd dist;\
|
||||
sha256sum *.tar.gz > SHA256SUMS.txt;\
|
||||
gpg -u 0x8A478B64FFE30F1095A8736BF5F27EFD1B38DABB --sign --armor --detach-sig --output SHA256SUMS.txt.asc SHA256SUMS.txt
|
||||
cp CHANGELOG dist/CHANGELOG.txt
|
||||
rsync -avzP dist/ charon:/www/cdn.jb55.com/tarballs/nostril/
|
||||
scp CHANGELOG charon:/www/cdn.jb55.com/tarballs/nostril/CHANGELOG.txt
|
||||
|
||||
deps/secp256k1/.git:
|
||||
@devtools/refresh-submodules.sh $(SUBMODULES)
|
||||
|
@ -57,6 +57,7 @@ nostril: $(HEADERS) $(OBJS) $(ARS)
|
|||
install: all
|
||||
install -Dm644 doc/nostril.1 $(PREFIX)/share/man/man1/nostril.1
|
||||
install -Dm755 nostril $(PREFIX)/bin/nostril
|
||||
install -Dm755 nostril-query $(PREFIX)/bin/nostril-query
|
||||
|
||||
config.h: configurator
|
||||
./configurator > $@
|
||||
|
|
|
@ -10,6 +10,7 @@ parser.add_argument('-p', '--mentions')
|
|||
parser.add_argument('-e', '--references')
|
||||
parser.add_argument('-t', '--hashtag')
|
||||
parser.add_argument('-i', '--ids')
|
||||
parser.add_argument('-k', '--kinds')
|
||||
parser.add_argument('-g',
|
||||
'--generic',
|
||||
nargs=2,
|
||||
|
@ -47,6 +48,9 @@ if args.mentions:
|
|||
if args.references:
|
||||
filt["#e"] = args.references.split(",")
|
||||
|
||||
if args.kinds:
|
||||
kinds = args.kinds.split(",")
|
||||
filt["kinds"] = [a for a in map(lambda s: int(s), kinds)]
|
||||
|
||||
q = json.dumps(["REQ","nostril-query",filt])
|
||||
print(q)
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "random.h"
|
||||
#include "proof.h"
|
||||
|
||||
#define VERSION "0.1.0"
|
||||
#define VERSION "0.1.2"
|
||||
|
||||
#define MAX_TAGS 32
|
||||
#define MAX_TAG_ELEMS 16
|
||||
|
|
|
@ -126,7 +126,7 @@ fi
|
|||
evid=$(jq -r '
|
||||
def tag(name): .tags[] | select(.[0] == name) | .[1];
|
||||
|
||||
. | [(.created_at | tostring), (.|tag("t")), (.|tag("author")), (.|tag("subject")), .pubkey[0:20], "id:\(.id)"] | @tsv' "$outname" |
|
||||
. | [(.created_at | tostring), (.|tag("t")), (.|tag("subject")), (.|tag("author")), .pubkey[0:20], "id:\(.id)"] | @tsv' "$outname" |
|
||||
sort -rn |
|
||||
$dateformatter |
|
||||
column -t -s $'\t' |
|
||||
|
|
Loading…
Reference in New Issue
Block a user