From 2190ac00d55a00d00f141fc14f0e8a65a47a49dd Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Tue, 11 Jan 2022 23:56:07 -0800 Subject: [PATCH] Delete trailing whitespace Just to keep my editor happy. --- html_generator.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/html_generator.py b/html_generator.py index 7d18e0a..9b1b114 100644 --- a/html_generator.py +++ b/html_generator.py @@ -5,7 +5,7 @@ Created on Thu Jan 6 23:35:23 2022 @author: Avram Gottschlich """ """ -I copied several functions from your code; +I copied several functions from your code; if it's easier to refer to them rather than copying them that's absolutely fine This rewrites the html each time it is called @@ -61,14 +61,14 @@ def link(lin, text): def hunt_info(turb, hunt): """ - Retrieves list of rounds, puzzles for the given hunt + Retrieves list of rounds, puzzles for the given hunt """ name = hunt["name"] hunt_id = hunt["hunt_id"] channel_id = hunt["channel_id"] - + puzzles = hunt_puzzles_for_hunt_id(turb, hunt_id) - + rounds = set() for puzzle in puzzles: if "rounds" not in puzzle: @@ -77,7 +77,7 @@ def hunt_info(turb, hunt): rounds.add(rnd) rounds = list(rounds) rounds.sort() - + return puzzles, rounds def round_stat(rnd, puzzles): @@ -90,7 +90,7 @@ def round_stat(rnd, puzzles): meta_solved = 0 for puzzle in puzzles: if "rounds" not in puzzle: - continue + continue if rnd in puzzle["rounds"]: if puzzle['type'] == 'meta': metas.append(puzzle) @@ -107,9 +107,9 @@ def round_stat(rnd, puzzles): unsolved_puzzles = sorted(unsolved_puzzles, key = lambda i: i['name']) rnd_puzzles = metas + unsolved_puzzles + solved_puzzles return puzzle_count, solved_count, rnd_puzzles, meta_solved, len(metas) - - - + + + def overview(puzzles, rounds): #big board, main page. saves as index.html start = ['\n', @@ -155,7 +155,7 @@ def overview(puzzles, rounds): '

Puzzles: {}/{}

\n'.format(solved_count, puzzle_count), '

Metas: {}/{}

\n'.format(meta_solved, metas), ' \n'] - + expanding += [ '