mirror of
https://github.com/jb55/nostril.git
synced 2024-11-21 16:29:06 -05:00
query: add -r (--raw) param
This removes the envelope
This commit is contained in:
parent
077b143614
commit
6a4b977961
|
@ -5,6 +5,7 @@ import argparse
|
|||
import json
|
||||
|
||||
parser = argparse.ArgumentParser(prog = 'nostril-query', description = 'Construct nostr queries')
|
||||
parser.add_argument('-r', '--raw', action=argparse.BooleanOptionalAction)
|
||||
parser.add_argument('-a', '--authors')
|
||||
parser.add_argument('-p', '--mentions')
|
||||
parser.add_argument('-e', '--references')
|
||||
|
@ -60,5 +61,10 @@ if args.kinds is not None:
|
|||
kinds = args.kinds.split(",")
|
||||
filt["kinds"] = [a for a in map(lambda s: int(s), kinds)]
|
||||
|
||||
q = json.dumps(["REQ","nostril-query",filt])
|
||||
q = ""
|
||||
if args.raw is not None:
|
||||
q = json.dumps(filt)
|
||||
else:
|
||||
q = json.dumps(["REQ","nostril-query",filt])
|
||||
|
||||
print(q)
|
||||
|
|
Loading…
Reference in New Issue
Block a user