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.py
contains almost all of the important variablesget_sheet_data.py
calls the Google API to get the Rare maps sheet in JSON formatget_drive_data.py
calls the Google API to items from Screenshots and Maps folders in JSON formatupdate_json_and_sheet.py
combinessheet_data_pre_processing
,screenshots_data.json
, andmaps_data.json
set_sheet_data.py
can 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.py
pulls everything together and generates HTML usinggenerate_css_html.py
,generate_other_html.py
, andgenerate_overflow_html.py
as templatesgtoken.py
is 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