diff options
author | Daniel Thompson <daniel.thompson@linaro.org> | 2019-11-11 17:33:12 +0000 |
---|---|---|
committer | Daniel Thompson <daniel.thompson@linaro.org> | 2019-11-11 17:33:12 +0000 |
commit | f34fd4264a94481258ae1b88ed874c8c498047fe (patch) | |
tree | 02f3a740b0fb821721e342cfc7a7c806c28fdf42 | |
parent | d4c080dac590781e8b702a2d29be52e97cab297c (diff) |
96btool: Filter for posts with no reply
-rwxr-xr-x | bin/96btool | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/96btool b/bin/96btool index ca29e72..725c85f 100755 --- a/bin/96btool +++ b/bin/96btool @@ -489,6 +489,9 @@ def do_filter(args): posts = [ p for p in posts if is_first_post(p) ] + if args.no_reply: + posts = [ p for p in posts if p['topic']['posts_count'] == 1 ] + if args.category: categories = args.category.lower().split(',') def matched(p): @@ -958,6 +961,8 @@ def main(argv): help="Search for a string within a post") s.add_argument("--since", default="2012-01-01", help="When to gather information from") + s.add_argument("--no-reply", action='store_true', + help="Keep only posts with no replies") s.add_argument('--tag', help='Filter by tag (exact match needed)') s.add_argument("--until", default="tomorrow", |