Skip to content

This Python script tracks your workouts by leveraging natural language API processing to extract information about the exercises you did. It uses the Nutritionix API to obtain exercise data based on your input, and sends the workout information to a Google Sheets document using the Sheety API.

Notifications You must be signed in to change notification settings

Izemaj/workout-tracking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Workout Tracker

This Python script tracks your workouts by using the Nutritionix API to get exercise data based on your input, and then sending the workout information to a Google Sheets document using the Sheety API.

Prerequisites

  • Python 3 installed on your machine
  • API credentials for Nutritionix and Sheety
  • A Google Sheets document created in your Sheety account

Installation

  1. Clone this repository on your local machine
  2. Install the required Python packages by running the following command in your terminal:
    pip install requests
  3. Export your API credentials as environment variables in your terminal, like this:
    export TOKEN=<your-sheety-api-token>
    export NUTRITION_APP_ID=<your-nutritionix-app-id>
    export NUTRITION_API_KEY=<your-nutritionix-api-key>
            
  4. Run the script by running the following command in your terminal:
    python main.py

Usage

  1. The script will ask you to enter the exercises you did in natural language format. For example, "I ran for 30 minutes and did 20 pushups".
  2. The script will use the Nutritionix API to get the exercise data and calculate the calories burned.
  3. The script will then send the workout information to your Google Sheets document using the Sheety API.

Output

The script will output the workout information in the following format:

    Exercise: <exercise_name>
    Duration: <duration_in_minutes> minutes
    Calories Burned: <calories_burned>
    

The information will also be sent to your Google Sheets document using the Sheety API.

About

This Python script tracks your workouts by leveraging natural language API processing to extract information about the exercises you did. It uses the Nutritionix API to obtain exercise data based on your input, and sends the workout information to a Google Sheets document using the Sheety API.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages