- Visit https://console.cloud.google.com/ and create new project
- Visit marketplace/library and enable google drive api
- Create credentials (pick google drive api and web server) then choose application data and click No, I'm not using them
- Click What credentials do I need?
- Pick your name and set role as project -> editor
- Key type should be set as JSON
- Enable google sheets api from library
- Clone this repository, create virtualenv and install requirements
- Paste your downloaded credentials to main folder and rename it to credentials.json
- Open credentials.json and copy your client_email
- Now in your opened sheet click share and paste your client email
- In sheet.py change name to name of your sheet in sheet variable
- Enable sheets.py script with your sheet name e.g. python sheets.py example_sheet
-
Remember, you have to set format type of two columns in your sheet:
- Duration
- Timestamps - this one will be created after enable script (columns from P7 to P15)
To change format type:
- Mark columns which you want to change
- Click format from top menu
- Hover on Number
- Choose Duration from bottom of list