-puzzles, rounds = hunt_info(turb, hunt)
-#I am not sure where these come from
-overview(puzzles, rounds)
-for rnd in rounds:
- round_overview(rnd, puzzles)
-for puzzle in puzzles:
- puzzle_overview(puzzle)
-puzzle_lists(puzzles, "All")
-puzzle_lists(puzzles, "Solved")
-puzzle_lists(puzzles, "Unsolved")
+ 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).")
+
+if len(sys.argv) < 2:
+ usage()
+ sys.exit(1)
+
+for hunt_id in sys.argv[1:]:
+ generate_for_hunt_id(table, hunt_id)