+ return {
+ 'id': new_sheet["spreadsheetId"],
+ 'url': new_sheet["spreadsheetUrl"]
+ }
+
+def sheets_create_for_puzzle(turb, puzzle):
+ """Creates a new sheet for a puzzle of the given name
+
+ Like sheets_create(), but also copies the puzzle template sheet.
+
+ Here, 'puzzle' is a dict that must have a 'name' key and may optionally
+ have a 'channel_url' or 'url' key."""
+
+ # First create the new sheet
+ new_sheet = sheets_create(turb, puzzle['name'])
+
+ # Insert some useful links into the sheet
+ if 'url' in puzzle:
+ url_text = "Original puzzle is at: {}".format(puzzle['url'])
+ else:
+ url_text = ''