-from turbot.blocks import section_block, text_block, divider_block
+from turbot.blocks import (
+ section_block, text_block, divider_block, accessory_block, button_block
+)
from turbot.round import round_blocks
from turbot.puzzle import puzzle_blocks, puzzle_matches_all
from turbot.channel import channel_url
all of these terms will be included in the
result. A match will be considered on any of
puzzle title, round title, puzzle URL, puzzle
- state or solution string. Terms can include
- regular expression syntax.
+ state, puzzle type, tags, or solution
+ string. Terms can include regular expression
+ syntax.
limit_to_rounds: A list of rounds. If provided only the given
rounds will be included in the output. Note:
hunt_text += " matching {}".format(" AND ".join(quoted_terms))
blocks = [
- section_block(text_block(hunt_text)),
+ accessory_block(
+ section_block(text_block(hunt_text)),
+ button_block("✏", "edit_hunt", hunt_id)
+ )
]
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