bodycomposition

package module
v1.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

README

GitHub Workflow Status GitHub release (latest SemVer) GitHub go.mod Go version (subdirectory of monorepo) Go Report Card Go Reference GitHub all releases GitHub license

bodycompostion

Bodycomposition is a program to manage your body measurements and composition stored in Garmin Connect Cloud (https://connect.garmin.com) from your beloved commandline.

For now, you can just add body composition values. Any other thing should be done in Garmin Connect.

Download

Releases can be found in release tab.

Usage

Uploading weight to Garmin connect. If you do not provide a password (--password), it will be prompted from stdin.

$ ./bodycomposition upload --weight 80 --bone 14 --fat 13 --hydration 58 --muscle 42 --email john.doe@mail.com

General usage

$ ./bodycomposition -h
Bodycomposition is a program to manage your body measurements and composition stored in
Garmin Connect Cloud (https://connect.garmin.com) from your beloved commandline.

For now, you can just add body composition values. Any other thing should be done in Garmin Connect.
Version v2.0.0

Usage:
  bodycomposition [command]

Available Commands:
  help        Help about any command
  upload      Upload your body composition values to Garmin Connect

Flags:
  -h, --help   help for bodycomposition

Use "bodycomposition [command] --help" for more information about a command.
Upload command usage
$ ./bodycomposition upload -h
Upload your body composition values to Garmin Connect

Usage:
  bodycomposition upload [flags]

Aliases:
  upload, u, add

Flags:
      --bmi float               Set your BMI - body mass index
  -b, --bone float              Set your bone mass in percent
      --bone-mass float         Set your bone mass in kilograms (use --bone or --bone-mass)
  -c, --calories float          Set your caloric intake
  -e, --email string            Email of the Garmin account
  -f, --fat float               Set your fat in percent
  -h, --help                    help for upload
      --hydration float         Set your hydration in percent
      --metabolic-age float     Set your metabolic age
  -m, --muscle float            Set your muscle mass in percent
      --muscle-mass float       Set your muscle mass in kilograms (use -muscle or --muscle-mass)
  -p, --password string         Password of the Garmin account
      --physique-rating float   Set your physique rating (valid values: 1-9)
  -t, --unix-timestamp int      Set the timestamp of the measurement (default -1)
      --visceral-fat float      Set your visceral fat rating (valid values: 1-60)
  -w, --weight float            Set your weight in kilograms (default -1)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Upload added in v1.5.0

func Upload(email, password string, bc BodyComposition) error

Upload uploads the BodyComposition data to garmin connect

Types

type BodyComposition

type BodyComposition struct {
	TimeStamp         time.Time
	Weight            float64
	PercentFat        float64
	PercentHydration  float64
	BoneMass          float64
	MuscleMass        float64
	VisceralFatRating float64
	PhysiqueRating    float64
	MetabolicAge      float64
	CaloriesActiveMet float64
	BodyMassIndex     float64
}

BodyComposition is the data container struct for managing the body measurements

func NewBodyComposition

func NewBodyComposition(weight, percentFat, percentHydration, boneMass, muscleMass, visceralFatRating, physiqueRating, metabolicAge, caloriesActiveMet, bmi float64, timestamp int64) BodyComposition

NewBodyComposition creates a new BodyComposition instance

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL