wjd52 / codex-blackboard

Meteor app for coordinating solving for our MIT Mystery Hunt team
GNU Affero General Public License v3.0
0 stars 0 forks source link

Use a different default sheet #2

Open wjd52 opened 3 years ago

wjd52 commented 3 years ago

Currently we use a MSExcel template for a default sheet. It'd be better to use a google drive sheet. Can we easily change this?

wjd52 commented 3 years ago

I believe the software copies an existing google sheet when creating a puzzle, so can we point it at a default sheet, and forget about the excel bit altogether?

wjd52 commented 3 years ago

Looks like the software does actually upload a new excel sheet for each puzzle so this might be trickier than I thought.

https://github.com/wjd52/codex-blackboard/blob/master/server/imports/drive.coffee is the relevant code

Torgen commented 3 years ago

https://developers.google.com/drive/api/v3/reference/files/copy is the method to copy an existing sheet, but you do have to specify what sheet it copies. Does it upload the xlsx once to the root folder after creating it, then duplicate it from there? You wouldn't want it to use a global public template that someone on another team might edit/delete out from under you.