commit 64a7497b52cd8b55ad0f0b66769aa92a33f45673
parent 6d820231a606f2bafccd307b6dcf7796ccedce03
Author: William Casarin <jb55@jb55.com>
Date: Tue, 2 Jul 2024 10:08:09 -0700
Merge 'Add option to limit to posts since date' #29
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/nostril-query b/nostril-query
@@ -20,6 +20,7 @@ parser.add_argument('-g',
metavar=('tag', 'value'),
help="Generic tag query: `#<tag>: value`")
parser.add_argument('-l', '--limit', type=int)
+parser.add_argument('-s', '--since', type=int)
def usage():
parser.print_help()
@@ -61,6 +62,9 @@ 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 = ""
if args.raw is not None:
q = json.dumps(filt)