fitweight

package module
v0.0.0-...-6452675 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 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

fitweight

Fitweight is a program to write weight measurements to .fit files based.

Acknowledgement

This program is based on bodycomposition.

Download

Releases can be found in release tab.

Usage

Creating a .fit file containing a weight measurement which can be uploaded to Garmin connect.

$ ./fitweight create --weight 80 --bone 14 --fat 13 --hydration 58 --muscle 42 --output monday.fit

General usage

$ ./fitweight -h
Fitweight is a program to write weight measurements to .fit files.

Version v1.0.0

Usage:
  fitweight [command]

Available Commands:
  help        Help about any command
  write       Writes the specified weight measurement to a .fit file

Flags:
  -h, --help   help for fitweight

Use "fitweight [command] --help" for more information about a command.
Write command usage
$ ./fitweight write -h
Writes the specified weight measurement to a .fit file

Usage:
  fitweight write [flags]

Aliases:
  write, w

Flags:
      --bmi float               Set your BMI - body mass index
  -b, --bone float              Set your bone mass in percent (default -1)
      --bone-mass float         Set your bone mass in kilograms (default -1)
  -c, --calories float          Set your caloric intake
  -f, --fat float               Set your fat in percent
  -h, --help                    help for write
      --hydration float         Set your hydration in percent
      --metabolic-age float     Set your metabolic age
  -m, --muscle float            Set your muscle mass in percent (default -1)
      --muscle-mass float       Set your muscle mass in kilograms (default -1)
  -o, --output string           Path to the output .fit file (default "default.fit")
      --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 WriteToDisk

func WriteToDisk(output string, wm WeightMeasurement) error

Types

type WeightMeasurement

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

WeightMeasurement is the data container struct for managing the weight measurements

func NewWeightMeasurement

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

NewWeightMeasurement creates a new WeightMeasurement instance

Directories

Path Synopsis
cmd
fitweight command

Jump to

Keyboard shortcuts

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