mirror of
https://github.com/jb55/nostril.git
synced 2024-11-24 17:09:07 -05:00
Merge 'Add option to limit to posts since date' #29
This commit is contained in:
commit
64a7497b52
|
@ -20,6 +20,7 @@ parser.add_argument('-g',
|
||||||
metavar=('tag', 'value'),
|
metavar=('tag', 'value'),
|
||||||
help="Generic tag query: `#<tag>: value`")
|
help="Generic tag query: `#<tag>: value`")
|
||||||
parser.add_argument('-l', '--limit', type=int)
|
parser.add_argument('-l', '--limit', type=int)
|
||||||
|
parser.add_argument('-s', '--since', type=int)
|
||||||
|
|
||||||
def usage():
|
def usage():
|
||||||
parser.print_help()
|
parser.print_help()
|
||||||
|
@ -61,6 +62,9 @@ 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)]
|
||||||
|
|
||||||
|
if args.since is not None:
|
||||||
|
filt["since"] = args.since
|
||||||
|
|
||||||
q = ""
|
q = ""
|
||||||
if args.raw is not None:
|
if args.raw is not None:
|
||||||
q = json.dumps(filt)
|
q = json.dumps(filt)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user