]> git.cworth.org Git - turbot/commitdiff
Add hint to expand search terms if implicitly filtered
authorCarl Worth <cworth@cworth.org>
Sat, 9 Jan 2021 13:39:30 +0000 (05:39 -0800)
committerCarl Worth <cworth@cworth.org>
Sat, 9 Jan 2021 13:39:30 +0000 (05:39 -0800)
I keep accidentally missing some search results when testing because
I'm searching for a tag that only exists on a solved puzzle so something
like:

/hunt cryptic

is not finding the solved puzzle with the CRYTPIC tag due to the
implicit filtering to only unsolved puzzles.

I still want that implicit filtering, but maybe this nudge will be
helpful in cases like this.

turbot/hunt.py

index 1e46f6c94eb2c96ed2f721e29facb73551bce85b..5bbbbc6cd6e77f72aabd1717b7b83f2dff6c44c7 100644 (file)
@@ -114,8 +114,11 @@ def hunt_blocks(turb, hunt, puzzle_status='unsolved', search_terms=[],
     ]
 
     if not len(puzzles):
+        text = "No puzzles found."
+        if puzzle_status != 'all':
+            text += ' (Consider searching for "all" puzzles?)'
         blocks += [
-            section_block(text_block("No puzzles found."))
+            section_block(text_block(text))
         ]
 
     # Construct blocks for each round