Skip to content

uuta/gas-workout-logs

Repository files navigation

gas-clasp-workout-logs

The goal in this project is to calcurate scores with daily workout logs, which has weight and count in each workout. This repository is mainly built by howdy39/gas-clasp-starter template.

Tech Stack

Prerequisites

Getting Started

Clone the repository

$ git clone --depth=1 https://github.com/uuta/gas-workout-logs <project_name>
$ cd <project_name>
$ rm -Rf .git

Install dependencies

$ yarn install

Configuration

Open .clasp.json, change scriptId

What is scriptId ? https://github.com/google/clasp#scriptid-required

{
  "scriptId": <your_script_id>,
  "rootDir": "dist"
}

Open src/appsscript.json, change timeZone (optional)

Apps Script Manifests

{
  "timeZone": "Asia/Tokyo", ## Change timeZone
  "dependencies": {
  },
  "exceptionLogging": "STACKDRIVER"
}

Development and build project

$ yarn run build

Push & Open Google Apps Script

$ yarn run push

How to use

1. Open a blank Google Spreadsheet

blank spreadsheet

2. Open the script editor

script editor

3. Copy the script ID from the URL

Copy the script ID from the URL of the script editor which is like the below.

https://script.google.com/home/projects/<scriptId>/edit

4. Build and push the project

Run the following command in the project directory.

$ yarn run push

5. Run updateWorkoutLogs function

run function

6. Set the trigger

Set the trigger to run the main function every 5 minutes. The main function can calculate the scores with the workout logs based on each weight and count.

Set the trigger

7. Check the scores

The calculated scores can be integrated with BI tools like Google Looker Studio. Check the maximum weights and daily scores

Check the scores

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published