add replacable list param to nostril-query

This commit is contained in:
William Casarin 2023-03-05 11:00:31 -05:00
parent 65c7077cce
commit d657ccdf84

View File

@ -8,6 +8,7 @@ parser = argparse.ArgumentParser(prog = 'nostril-query', description = 'Construc
parser.add_argument('-a', '--authors') parser.add_argument('-a', '--authors')
parser.add_argument('-p', '--mentions') parser.add_argument('-p', '--mentions')
parser.add_argument('-e', '--references') parser.add_argument('-e', '--references')
parser.add_argument('-d', '--parameter')
parser.add_argument('-t', '--hashtag') parser.add_argument('-t', '--hashtag')
parser.add_argument('-i', '--ids') parser.add_argument('-i', '--ids')
parser.add_argument('-k', '--kinds') parser.add_argument('-k', '--kinds')
@ -48,6 +49,9 @@ if args.mentions is not None:
if args.references is not None: if args.references is not None:
filt["#e"] = args.references.split(",") filt["#e"] = args.references.split(",")
if args.parameter is not None:
filt["#d"] = args.parameter.split(",")
if args.kinds is not None: if args.kinds is not None:
kinds = args.kinds.split(",") kinds = args.kinds.split(",")
filt["kinds"] = [a for a in map(lambda s: int(s), kinds)] filt["kinds"] = [a for a in map(lambda s: int(s), kinds)]