Currently, we have a well-organized archive of many of the hex puzzles from 1997-1995 with most of the puzzles and solutions scanned from the pages of The Atlantic.
Google Drive is a great way to collect these files and organize them, but we need a way to store the archive files so they can be served easily from a website and converted to images and such.
For this, we need a way to sync the files from Drive to Cloud Storage.
To do this, we can use a Cloud Function.
The cloud function should first collect a lit of all the files within the following Google Shared Drive Folder:
https://drive.google.com/drive/folders/16gAEPIqARsXaHjtzhZUBrZgJwqVl2utN
Within there, there is a folder for each year from 1977-2009. Within each folder there is are several files, but the two we care about area:
YYYY-MM-DD Puzzle Title.pdf
(puzzle)
YYYY-MM-DD Puzzle Title (solution).pdf
(solution)
Once we have the list, for each puzzle, we should also get the list of all puzzles from firestore. That will allow us to verify the puzzle information is accurate before we store it. We may want to store the files using the ID from the database instead of the name from firestore?
We should store PDFs, but for each file, we probably also want to have the PNG files and thumbnails. Use the puzzle ID for all of these?
We will also need a report that shows what we have and don't have so we can complete the archive.