This is a Google Apps Script Web App that, given a Google calendar and date range, provides a summary of the total hours and number of events during the range as well as details for each event.
The interface looks like this:
And the output looks like this:
- Create a calendar for a project you're starting
- Each time you spend time on the project:
- Create a project calendar event
- Give it a descriptive title like "Initial project configuration"
- Set the duration to the amount of time you spent
- Use the Google Calendar Time Tracker weekly to review your time spent on the project
This web app collects no information about users or their Google accounts. You can verify this by inspecting the source code in /src/code.js
.
Access the latest version of the Google Calendar Time Tracker here.
Since this web app is not published through Google, you will need to click through the security warnings.
-
Clone the repository
git clone https://github.com/NathanielBrewer/google-calendar-time-tracker.git cd google-calendar-time-tracker
-
Install dependencies
npm install
-
Configure Google Apps Script
- Navigate to your Google Apps Script project and open the Project Settings
- Copy the Script ID and paste it into either the
devScriptId
,prodScriptId
, or thescriptId
variable in the .clasp.json file located atsrc/.clasp.json
- Adjust the appscript.json as needed. Documentation available here
-
Develop
- The entry file is
src/code.js
. This gets built tobuild/<prod|dev>/code.gs
, which is a runnable Google Apps Script file. - After making changes and any files in the
src/
directory, abuild:<prod|dev>
command must be run before those changes will be exectuable by Google Apps Script. - While developing, make your changes and then use
reload:<prod|dev>
to run bothbuild:<prod|dev>
andpush:<prod|dev>
commands.
- The entry file is
-
Build
The build step is required to convert the files into a single Google Script file that can then be pushed and deployed to your Apps Script project.
Command:
npm run build:<prod|dev>
-
Push
Invoke
clasp push
for either theprod
ordev
script IDnpm run push:<prod|dev>
-
Deploy
Invoke
clasp deploy
for either theprod
ordev
script IDnpm run deploy:<prod|dev>
-
Reload
For faster development, build and push in one command
npm run reload:<prod|dev>