+def generate_for_hunt_id(table, hunt_id):
+ hunt, puzzles, rounds = hunt_info(table, hunt_id)
+
+ # Create a directory for the hunt in the WEBROOT
+ root = hunt_file(hunt, "")
+ try:
+ os.mkdir(root)
+ except FileExistsError:
+ # We're happy as a clam if the directory already exists
+ pass
+
+ overview(hunt, puzzles, rounds)
+ for rnd in rounds:
+ round_overview(hunt, rnd, puzzles)
+ for puzzle in puzzles:
+ puzzle_overview(hunt, puzzle)
+ puzzle_lists(hunt, puzzles, "All")
+ puzzle_lists(hunt, puzzles, "Solved")
+ puzzle_lists(hunt, puzzles, "Unsolved")
+
+
+# Initialize AWS resources to talk to the database
+db = boto3.resource('dynamodb')
+table = db.Table("turbot")
+
+def usage():
+ print("Usage: {} hunt_id [...]")
+ print("")
+ print("Generates pages (under {}) ".format(WEBROOT))
+ print("for the specified hunt_id(s).")