cs-surf-archive.github.io
- Create a credentials.json by:
- In the Google Cloud console, go to Menu menu > IAM & Admin > Service Accounts. Go to Service Accounts.
- Select your service account.
- Click Keys > Add key > Create new key.
- Select JSON, then click Create.
- Click Close.
- Place it in the root folder
- Run generate_website.py
- Authenticate in browser to generate token.json (only cs-surf-archive@gmail.com has access)
- Watch the magic happen
config.pycontains almost all of the important variablesget_sheet_data.pycalls the Google API to get the Rare maps sheet in JSON formatget_drive_data.pycalls the Google API to items from Screenshots and Maps folders in JSON formatupdate_json_and_sheet.pycombinessheet_data_pre_processing,screenshots_data.json, andmaps_data.jsonset_sheet_data.pycan update either just a row or a whole sheet. Whole sheet is only in use for now. Row updates = too many API calls.- This ensures the data in the drive always matches the sheet
generate_website.pypulls everything together and generates HTML usinggenerate_css_html.py,generate_other_html.py, andgenerate_overflow_html.pyas templatesgtoken.pyis used to generate the credentials for APIs.
- Print if map exist in drive but not sheet
- Add entry to sheet if map exist in drive but not sheet