add replacable list param to nostril-query

This commit is contained in:
William Casarin 2023-03-05 11:00:31 -05:00
parent 914e1fd111
commit 9199027424

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