3.2. Keeping a food diary
Prev | Chapter 3. Using Pantry: practical examples | Next

## 3.2. Keeping a food diary

Suppose that on May 8 you want to keep track of everything you eat. Following our previous example, you locate the foods you need in `master`, and then you add them to a file as you'll see in the following example. You print the traits of the foods as you add them to make sure that you're adding the right foods.

Example 3.6. Adding entries to a diary

    $ pantry --ignore-case --name "apples, raw, with skin" --c-qty \
    > 1 --c-unit large --c-date "May 8" --c-meal Breakfast --print \
    > traits --add diary master
    Apples, raw, with skin
    Group: Fruits and Fruit Juices
    Date: May 8 Meal: Breakfast
    Refuse: 10 percent Core and stem
    1 large (3-1/4" dia) (223g)

    $ pantry --ignore-case --name "kellogg's corn flakes" \
    > --c-qty 1 --c-unit cup --c-date "May 8" --c-meal Breakfast \
    > --print traits --add diary master
    Cereals ready-to-eat, KELLOGG, KELLOGG'S Corn Flakes
    Group: Breakfast Cereals
    Date: May 8 Meal: Breakfast
    1 cup (1 NLEA serving) (28g)

    $ pantry --ignore-case --name "milk, reduced fat, fluid, 2% \
    > milkfat, with added vitamin A" --c-qty 1 --c-unit cup --c-date \
    > "May 8" --c-meal Breakfast --print traits --add diary master
    Milk, reduced fat, fluid, 2% milkfat, with added vitamin A
    Group: Dairy and Egg Products
    Date: May 8 Meal: Breakfast
    1 cup (244g)

    $ pantry --ignore-case --name "carrots, raw" --c-qty 1 \
    > --c-unit ^large --c-date "May 8" --c-meal Lunch --print \
    > traits --add diary master
    Carrots, raw
    Group: Vegetables and Vegetable Products
    Date: May 8 Meal: Lunch
    Refuse: 11 percent Crown, tops and scrapings
    1 large (7-1/4" to 8-/1/2" long) (72g)

    $ pantry --ignore-case --name "chicken.*wing, meat and skin, \
    > cooked, roasted" --c-date "May 8" --c-unit wing --c-qty \
    > 3 --c-meal Lunch --print traits --add diary master
    Chicken, broilers or fryers, wing, meat and skin, cooked, roasted
    Group: Poultry Products
    Date: May 8 Meal: Lunch
    Refuse: 48 percent Bone
    3 wing, bone removed (102g)

    $ pantry --ignore-case --name "ice creams, chocolate, rich" \
    > --c-qty 1 --c-unit cup --c-date "May 8" --c-meal \
    > "Lunch" --print traits --add diary master
    Ice creams, chocolate, rich
    Group: Sweets
    Date: May 8 Meal: Lunch
    1 cup (148g)

    $ pantry --ignore-case --name "mcdonald's, cheeseburger" \
    > --c-unit item --c-qty 1 --c-date "May 8" --c-meal \
    > "Dinner" --print traits --add diary master
    McDONALD'S, Cheeseburger
    Group: Fast Foods
    Date: May 8 Meal: Dinner
    1 item (119g)

    $ pantry --ignore-case --name "mcdonald's, french fries" \
    > --c-qty 1 --c-unit large --c-date "May 8" --c-meal Dinner \
    > --print traits --add diary master
    McDONALD'S, French Fries
    Group: Fast Foods
    Date: May 8 Meal: Dinner
    1 large serving (170g)

    $ pantry --ignore-case --name "popcorn, oil-popped, unsalted" \
    > --c-qty 2 --c-unit oz --c-date "May 8" --c-meal Dinner \
    > --print traits --add diary master
    Snacks, popcorn, oil-popped, unsalted
    Group: Snacks
    Date: May 8 Meal: Dinner
    2 oz (57g)

Now you want to know a little about what you ate:

Example 3.7. Printing nutrient reports about a diary

    $ pantry --print traits-nuts-blank diary
    Snacks, popcorn, oil-popped, unsalted
    Group: Snacks
    Date: May 8 Meal: Dinner
    2 oz (57g)
    Nutrient                  Amount         %G     %TOT
    -------------------------------------------------------
    Calories                  295  kcal       15     13
    Total Fat                 16   g          25     14
    Saturated Fat             3    g          14     7
    Cholesterol               0    mg         0      0
    Sodium                    2    mg         0      0
    Total Carbohydrate        33   g          11     14
    Dietary Fiber             6    g          23     24
    Sugars                    0    g          NA     0
    Protein                   5    g          10     7
    Vitamin A                 87   IU         2      1
    Vitamin C                 0    mg         0      1
    Calcium                   6    mg         1      1
    Iron                      2    mg         9      9

    McDONALD'S, Cheeseburger
    Group: Fast Foods
    Date: May 8 Meal: Dinner
    1 item (119g)
    Nutrient                  Amount         %G     %TOT
    -------------------------------------------------------
    Calories                  313  kcal       16     14
    Total Fat                 14   g          22     13
    Saturated Fat             5    g          26     14
    Cholesterol               42   mg         14     18
    Sodium                    745  mg         31     47
    Total Carbohydrate        33   g          11     14
    Dietary Fiber             1    g          5      6
    Sugars                    7    g          NA     10
    Protein                   15   g          31     21
    Vitamin A                 289  IU         6      2
    Vitamin C                 1    mg         1      2
    Calcium                   199  mg         20     25
    Iron                      3    mg         16     16

    Apples, raw, with skin
    Group: Fruits and Fruit Juices
    Date: May 8 Meal: Breakfast
    Refuse: 10 percent Core and stem
    1 large (3-1/4" dia) (223g)
    Nutrient                  Amount         %G     %TOT
    -------------------------------------------------------
    Calories                  116  kcal       6      5
    Total Fat                 0    g          1      0
    Saturated Fat             0    g          0      0
    Cholesterol               0    mg         0      0
    Sodium                    2    mg         0      0
    Total Carbohydrate        31   g          10     13
    Dietary Fiber             5    g          21     23
    Sugars                    23   g          NA     31
    Protein                   1    g          1      1
    Vitamin A                 120  IU         2      1
    Vitamin C                 10   mg         17     33
    Calcium                   13   mg         1      2
    Iron                      0    mg         1      2

    McDONALD'S, French Fries
    Group: Fast Foods
    Date: May 8 Meal: Dinner
    1 large serving (170g)
    Nutrient                  Amount         %G     %TOT
    -------------------------------------------------------
    Calories                  573  kcal       29     26
    Total Fat                 30   g          47     27
    Saturated Fat             6    g          30     16
    Cholesterol               0    mg         0      0
    Sodium                    330  mg         14     21
    Total Carbohydrate        70   g          23     29
    Dietary Fiber             7    g          28     30
    Sugars                    0    g          NA     0
    Protein                   6    g          11     8
    Vitamin A                 0    IU         0      0
    Vitamin C                 8    mg         14     27
    Calcium                   27   mg         3      3
    Iron                      2    mg         10     10

    Cereals ready-to-eat, KELLOGG, KELLOGG'S Corn Flakes
    Group: Breakfast Cereals
    Date: May 8 Meal: Breakfast
    1 cup (1 NLEA serving) (28g)
    Nutrient                  Amount         %G     %TOT
    -------------------------------------------------------
    Calories                  101  kcal       5      5
    Total Fat                 0    g          0      0
    Saturated Fat             0    g          0      0
    Cholesterol               0    mg         0      0
    Sodium                    202  mg         8      13
    Total Carbohydrate        24   g          8      10
    Dietary Fiber             1    g          3      3
    Sugars                    3    g          NA     4
    Protein                   2    g          4      3
    Vitamin A                 501  IU         10     3
    Vitamin C                 6    mg         10     20
    Calcium                   1    mg         0      0
    Iron                      8    mg         45     46

    Chicken, broilers or fryers, wing, meat and skin, cooked, roasted
    Group: Poultry Products
    Date: May 8 Meal: Lunch
    Refuse: 48 percent Bone
    3 wing, bone removed (102g)
    Nutrient                  Amount         %G     %TOT
    -------------------------------------------------------
    Calories                  296  kcal       15     13
    Total Fat                 20   g          31     18
    Saturated Fat             6    g          28     15
    Cholesterol               86   mg         29     36
    Sodium                    84   mg         3      5
    Total Carbohydrate        0    g          0      0
    Dietary Fiber             0    g          0      0
    Sugars                    0    g          0      0
    Protein                   27   g          55     38
    Vitamin A                 161  IU         3      1
    Vitamin C                 0    mg         0      0
    Calcium                   15   mg         2      2
    Iron                      1    mg         7      7

    Ice creams, chocolate, rich
    Group: Sweets
    Date: May 8 Meal: Lunch
    1 cup (148g)
    Nutrient                  Amount         %G     %TOT
    -------------------------------------------------------
    Calories                  377  kcal       19     17
    Total Fat                 25   g          39     23
    Saturated Fat             15   g          77     40
    Cholesterol               89   mg         30     38
    Sodium                    84   mg         4      5
    Total Carbohydrate        31   g          10     13
    Dietary Fiber             1    g          5      6
    Sugars                    26   g          NA     34
    Protein                   7    g          14     10
    Vitamin A                 1055 IU         21     7
    Vitamin C                 1    mg         1      2
    Calcium                   210  mg         21     27
    Iron                      2    mg         8      9

    Carrots, raw
    Group: Vegetables and Vegetable Products
    Date: May 8 Meal: Lunch
    Refuse: 11 percent Crown, tops and scrapings
    1 large (7-1/4" to 8-/1/2" long) (72g)
    Nutrient                  Amount         %G     %TOT
    -------------------------------------------------------
    Calories                  30   kcal       1      1
    Total Fat                 0    g          0      0
    Saturated Fat             0    g          0      0
    Cholesterol               0    mg         0      0
    Sodium                    50   mg         2      3
    Total Carbohydrate        7    g          2      3
    Dietary Fiber             2    g          8      9
    Sugars                    3    g          NA     5
    Protein                   1    g          1      1
    Vitamin A                 12028 IU         241    82
    Vitamin C                 4    mg         7      14
    Calcium                   24   mg         2      3
    Iron                      0    mg         1      1

    Milk, reduced fat, fluid, 2% milkfat, with added vitamin A
    Group: Dairy and Egg Products
    Date: May 8 Meal: Breakfast
    1 cup (244g)
    Nutrient                  Amount         %G     %TOT
    -------------------------------------------------------
    Calories                  122  kcal       6      5
    Total Fat                 5    g          7      4
    Saturated Fat             3    g          15     8
    Cholesterol               20   mg         7      8
    Sodium                    100  mg         4      6
    Total Carbohydrate        11   g          4      5
    Dietary Fiber             0    g          0      0
    Sugars                    12   g          NA     16
    Protein                   8    g          16     11
    Vitamin A                 461  IU         9      3
    Vitamin C                 0    mg         1      2
    Calcium                   285  mg         29     37
    Iron                      0    mg         0      0

You also want to know what all this adds up to:

Example 3.8. Getting totals about a diary

    $ pantry --print sum diary
    SUM:
    Nutrient                  Amount         %G
    -----------------------------------------------------
    Calories                  2223 kcal       111
    Total Fat                 111  g          171
    Saturated Fat             38   g          191
    Cholesterol               236  mg         79
    Sodium                    1599 mg         67
    Total Carbohydrate        240  g          80
    Dietary Fiber             23   g          93
    Sugars                    76   g          NA
    Protein                   72   g          144
    Vitamin A                 14704 IU         294
    Vitamin C                 31   mg         52
    Calcium                   781  mg         78
    Iron                      18   mg         98

If your diary file contained foods for several days, you would have used `--date` to limit the search results to just today.

If this seemed to require a lot of typing, that's because it did require a lot of typing. Later we'll learn some ways you can speed this process up.

Prev | Up | Next
Chapter 3. Using Pantry: practical examples | Home | 3.3. Organizing your foods into files