Skip to content

marshki/GlucTool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

407 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GlucTool 🩸 🧰

Travis Codacy Maintained Python MIT Open Source

A blood sugar conversion tool

Python 3 utility for converting plasma glucose ("blood sugar") units using argument parsing.

Convert:

  • milligram per decileter to millimole per liter (mg/dl to mmol/l)
  • millimole per liter to milligram per decileter (mmol/l to mg/dl)

Output:

  • a table of the conversion, e.g:
mg/dl mmol/l
70.0000 3.8850
71.0000 3.9405
72.0000 3.9960
73.0000 4.0515
74.0000 4.1070
  • a csv of the conversion, e.g.:

    mg/dl,mmol/l
    70.0,3.885
    71.0,3.9405
    72.0,3.996
    73.0,4.0515
    74.0,4.107
    

Requirements

None.

Usage

Synopsis:

[-h] (--mg-to-mmol MG_TO_MMOL [MG_TO_MMOL ...] | --mmol-to-mg MMOL_TO_MG [MMOL_TO_MG ...])
[--csv FILE]

Examples

Single conversion:

python3 gluctool.py --mmol-to-mg 4.0515

Multiple conversions:

(spaced arguments)

python3 gluctool.py --mg-to-mmol 7.5 8.5 9.5 10

(brace expanson)

python3 gluctool.py --mg-to-mmol 7{0..9}

Export to csv:

python3 gluctool.py --mg-to-mmol 7.5 8.5 9.5 10 --csv filename

Change Log

CHANGELOG

License

LICENSE

About

Python arg parser converts blood glucose levels between Intl. (mmol/l) and US (mg/dl) standards.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages