X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=turbot%2Fround.py;h=3e12f5c17eb560c0650b1d8c1c22435a94f2fb1f;hb=61f3273b217ea1be55adc24c294a4318a98733ef;hp=3a4266faae1483e4d2e68351de9a825f3eb1309f;hpb=10dd20653d14706cc1c7689745f8bcd80c29fa2b;p=turbot diff --git a/turbot/round.py b/turbot/round.py index 3a4266f..3e12f5c 100644 --- a/turbot/round.py +++ b/turbot/round.py @@ -1,7 +1,7 @@ from turbot.puzzle import puzzle_blocks from turbot.blocks import section_block, text_block -def round_blocks(round, puzzles): +def round_blocks(round, puzzles, omit_header=False): """Generate Slack blocks for a round The 'round' argument should be the name of a round as it appears @@ -15,11 +15,14 @@ def round_blocks(round, puzzles): channels and sheets, etc.). """ - round_text = "*Round: {}*".format(round) + if omit_header: + blocks = [] + else: + round_text = "*Round: {}*".format(round) - blocks = [ - section_block(text_block(round_text)), - ] + blocks = [ + section_block(text_block(round_text)), + ] for puzzle in puzzles: if 'rounds' not in puzzle: