From e1cfe8045ab4fc9e5a71af48689188869cb208e0 Mon Sep 17 00:00:00 2001 From: Scott Weldon Date: Sat, 6 May 2023 22:25:44 -0700 Subject: [PATCH] Add option to limit to posts since date --- nostril-query | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nostril-query b/nostril-query index 4227352..e36de1b 100755 --- a/nostril-query +++ b/nostril-query @@ -17,6 +17,7 @@ parser.add_argument('-g', metavar=('tag', 'value'), help="Generic tag query: `#: value`") parser.add_argument('-l', '--limit', type=int) +parser.add_argument('-s', '--since', type=int) def usage(): parser.print_help() @@ -52,5 +53,8 @@ if args.kinds is not None: kinds = args.kinds.split(",") filt["kinds"] = [a for a in map(lambda s: int(s), kinds)] +if args.since is not None: + filt["since"] = args.since + q = json.dumps(["REQ","nostril-query",filt]) print(q)