100 days of code: Day 22 - weight tracker

Last modified on 2020-06-30

Source: 100-days-of-code.

I now have a Python-powered weight tracking program! Updated my datetag.py module with new functions that I import into dates_weights.py

$ ./dates_weights.py -h
usage: dates_weights.py [-h] [-o OUTPUT] [-q] [-r] source

Retrieve weight measurements and dates they were recorded from <source>.

positional arguments:
  source                data source file

optional arguments:
  -h, --help            show this help message and exit
  -o OUTPUT, --output OUTPUT
                        save data to file
  -q, --quiet           do not display output
  -r, --raw             display list of matching patterns

Program uses matching patterns to build a dictionary using weight measured in kg as the value and date recorded as key. Run without options it outputs the dictionary plus latest/maximum/minimum weight and the date to the display.

Next up: data visualization!

Happy hacking!