diff --git a/Makefile b/Makefile index 7dec080..f7fe313 100644 --- a/Makefile +++ b/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 > $@ diff --git a/nostril-query b/nostril-query index 8073295..90e772a 100755 --- a/nostril-query +++ b/nostril-query @@ -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) diff --git a/nostril.c b/nostril.c index a47a208..0f83fbd 100644 --- a/nostril.c +++ b/nostril.c @@ -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 diff --git a/scripts/git-show-nostr b/scripts/git-show-nostr index 425e101..9f2045a 100755 --- a/scripts/git-show-nostr +++ b/scripts/git-show-nostr @@ -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' |