~rgrjr/meals

Add inclusion context to unit conversion warnings

   Work done on 14-May-22.
* Food/HasIngredients.pm:
   + (add_ingredient):  Add a $warning param and pass when instantiating
     the ingredient.
* Food/Ingredient.pm:
   + (new):  If we have a conversion problem and the "warn" option is
     specified, call that to emit the warning message.
* Food/Item.pm:
   + (parse_recipes $parse_file):  Pass our $warning sub when making
     items and recipes and when calling add_ingredient so that
     conversion warnings come with inclusion context.
Add three items to commercial-foods.text

* commercial-foods.text:
   + Add items Haldiram's dal palak, MTR "meal time" navratan kurma, and
     Beyond sausage.
Fix a typo in "Jan's saag paneer 9"

* recipes.text:
   + Fix a typo in "Jan's saag paneer 9":  It should be 13.5oz of
     coconut milk, not 13.5C.  (Change made on 29-Jun-22.)
Update to 9-May-22, without recipes

Recipes since 6-May are no longer being kept in Git.
* basic-ingredients.text:
   + Add an alias for Quaker Oats oatmeal.
   + Change "flour tortilla" to singular (from "flour tortillas").
* commercial-foods.text:
   + Add items flour tortilla, Impossible meatballs, organic greens 5,
     Beyond chicken, and Mt. Olive dill pickle relish.
Bring up to date (since 15-Nov-21)

* basic-ingredients.text:
   + Added items mayonnaise, tartar sauce, and Mayura tikka masala
     sauce.
* commercial-foods.text:
   + Added items Alpha strips grilled chik'n, Butler's soy curls,
     Hellman's vegan dressing & spread, MTR "meal time" muttar paneer,
     MTR "meal time" paneer butter masala, MTR "meal time" shahi paneer,
     TVP bacon bits, Twin Dragon egg roll wrapper, Violife mozzarella
     style shreds, generic french fries, generic onion rings, and
     soyrizo.
* recipes.text:
   + Added recipes "real" fish chowder, General Tso's Butler's soy
     curls, General Tso's tofu 11, Jan's banana pancakes 6, Jan's banana
     pancakes 7, Jan's banana pancakes 8, Jan's chili 33, Jan's chili 34,
     Jan's leftover egg roll, Jan's stuffed egg, Nepali potatoes 5, PETA
     pad thai 8, Punjab aloo gobhi 2, asparagus, mushroom, tofu stir-fry,
     braised green beans with tomatoes, candied sweet potatoes, chile
     relleno 2, chile relleno sauce 2, deconstructed stuffed pepper, garam
     masala muffin, garlic broccoli stir fry, green bean wombat, mushroom
     and pea curry 2, mushroom fajitas, mushroom wellington, oriental
     baked tofu 2, pasta and feta 34, pasta and feta 35, potato leek soup
     with tofu, roasted vegetables, soy curls in peanut sauce, spicy kung
     pao brussels sprouts, stir-fried veggies 21, stir-fried veggies for
     ramen 15, stir-fried veggies with ramen 1, stir-fried veggies with
     tofu 29, stir-fried veggies with tofu 30, sweet potato & black bean
     quinoa bake, tahini-lemon sauce, tikka masala veggies with paneer,
     and tortilla soup 4.
Update since 16-Aug.
* basic-ingredients.text:
   + Added items Gopi paneer, plum, sherry, and soy bean sprouts.
* commercial-foods.text:
   + Added items MTR "meal time" mixed vegetable curry, MTR "meal time"
     palak paneer, MTR "meal time" paneer makhani, Pastene pizza sauce,
     Tasty Bite Jaipur vegetables, Trader Joe's new soy chorizo, and
     generic fried clam strips.
* recipes.text:
   + Added recipes Jan's baked tofu nigiri sushi, Jan's banana pancakes
     4, Jan's banana pancakes 5, Jan's chili 29, Jan's chili 30, Jan's
     chili 31, Jan's chili 32, Jan's olive, spinach, pepper pizza, Jan's
     olive, spinach, squash pizza, Jan's olive, spinach, squash, pepper
     pizza, Jan's pancakes 5, Jan's plum nigiri sushi, Jan's saag paneer
     4, Jan's spanakopita 3, Szechuan eggplant without tofu 2, broccoli
     and potato soup, channa dal 2, chile relleno sauce, chile relleno,
     feta and mushroom quiche 5, fish chowder, mushroom and pea sabji
     with paneer, noodles and sauce for PETA pad thai 8, pasta and feta
     31, pasta and feta 32, pasta and feta 33, pizza crust, roasted
     B-sprouts & sweet potatoes, stir-fried broc with fried tofu 15,
     stir-fried veggies for ramen 14, stir-fried veggies with baked tofu
     2, stir-fried veggies with fried tofu 30, stir-fried veggies with
     tofu 26, stir-fried veggies with tofu 27, stir-fried veggies with
     tofu 28, tofu scramble, and veggies for PETA pad thai 8.
* Food/Item.pm:
   + (present_summary):  Let the name field leak into the whitespace of
     the leftmost food value column (the net carbs) as long as there are
     at least two spaces between them.
* makefile:
   + (test-day5):  Test case for same.
* test/day5.text (added), test/test-day5.text (added):
   + Test data for same.
* commercial-foods.text:
   + Add the "Tofurkey new original Italian sausage" item, which is of
     the right name length to test this.
Update since 14-Mar.
   recipes.text is now over 10K lines, so I may split it up just for
   that reason.
* basic-ingredients.text:
   + Add item coconut milk.
   + Plus a few aliases and tweaks.
* commercial-foods.text:
   + Add items Ashoka methi malai matar, Ghirardelli brownie mix,
     Grandmother's mincemeat, Joseph's lavash bread, Snyder's mini
     pretzels, and rice ramen noodle.
* recipes.text:
   + Add recipes General Tso's tofu 10, General Tso's tofu 8, General
     Tso's tofu 9, Ghirardelli brownie, Jan's banana pancakes 3, Jan's
     chili 27, Jan's chili 28, Jan's pesto and olive pizza, Jan's pumpkin
     pancakes, Jan's saag paneer 7, Jan's saag paneer 8, Jan's saag paneer
     9, Jan's seitan, Jan's spanakopita 3, PETA pad thai 7, Thai eggplant
     with basil, asparagus and sweet potatoes, carrot and spinach soup,
     channa dal, classic spicy curry sauce, creamy green goddess dressing,
     curried chickpea and broccoli burger, curried seitan, epic baba
     ganoush, green split-pea soup with carrots 3, indian-style carrots
     and beets, kidney bean wombat soup, luxurious tomato-basil sauce 11,
     mincemeat pie 2, pasta and feta 24, pasta and feta 25, pasta and feta
     26, pasta and feta 27, pasta and feta 28, pasta and feta 29, pasta
     and feta 30, potato leek soup 8, roasted eggplant curry with
     chickpeas, soul-soothing african peanut stew 2, stir-fried veggies
     with black soy beans 2, stir-fried veggies with fried tofu 27,
     stir-fried veggies with fried tofu 28, stir-fried veggies with fried
     tofu 29, stir-fried veggies with tofu 22, stir-fried veggies with
     tofu 23, stir-fried veggies with tofu 24, stir-fried veggies with
     tofu 25, stuffed pepper with tofu, sweet potato & black bean rice
     bake, tofu and feta lasagne, and white bean and mushroom stew.
* Food/Item.pm:
   + (show_item_details):  Bug fix:  Replace "next" with "return", since
     this is a sub and not a loop.
* Food/Item.pm:
   + (present_summary):  Don't show negative servings.
* test/test-day1.item.tbl:
   + Test consequence.
* basic-ingredients.text:
   + Add Nestle chocolate chips and Ghirardelli chocolate chips as
     aliases for chocolate chips, since they all work out to the same.
* commercial-foods.text:
   + Correct the carbs for Regal Kitchen mixed vegetable curry.
   + Add item paneer pakora.
* Food/Meal.pm:
   + (parse_meals):  Bug fix:  Recognize "-" explicitly as stdin.
9321282e — Bob Rogers 3 years ago
Recipe updates since 10-Feb-21 (the Pi Day Update)
* basic-ingredients.text:
   + Added item mahi mahi.
* commercial-foods.text:
   + Added items Regal Kitchen mixed vegetable curry, MTR new paneer
     makhani, Tofurky plant-based chick'n, and Cibo Naturals sundried
     tomato pesto.
* recipes.text:
   + Added recipes Jan's chili 25, Jan's chili 26, Jan's maple
     oatmeal scone 3, Jan's pesto tofu sausage and olive pizza, PETA
     pad thai 6, aloo chole 3, classic no-onion kidney bean curry,
     pasta and feta 21, pasta and feta 22, pasta and feta 23,
     sauteed artichokes and mushrooms, spicy punjabi red kidney bean
     stew 3, stir-fried veggies with chick'n, stir-fried veggies
     with fried tofu 26, stir-fried veggies with tofu 21, tortilla
     soup 3, and veggie frittata.
e1c76f17 — Bob Rogers 3 years ago
* Food/Item.pm:
   + (show_item_details):  Print the item name display on a separate
     line if it is too long, to keep the data columns from shifting.
     Also, suppress weight in grams if those were the original units.
* test/test-show1.text:
   + No added weight for "125g flour".
d048ac55 — Bob Rogers 3 years ago
Don't use tabs in the output.
* Food/Base.pm:
   + (show_total):  Replace the tab in the result with a single space.
* Food/Item.pm:
   + (present_summary):  When printing the item name, expand the length
     of the field to replace the former leading show_total tab, and put
     the name on its own line if it would shift the other columns.  Also
     remove the tab from the start of the "#svg" display at the end.
* test/test-day1.day.tbl, test/test-day1.file.tbl:
* test/test-day1.item.tbl, test/test-day1.tbl, test/test-day2.tbl:
* test/test-day3.text, test/test-day4.text, test/test-show1.text:
   + Of course, this has a huge if invisible impact on the test suite.
21707c45 — Bob Rogers 3 years ago
* Food/Item.pm:
   + (_sane_amount):  Helper for formatting measurements with units.
   + (show_item_details):  Use same to prevent "1.333333333C" units.
b1d09b47 — Bob Rogers 3 years ago
* makefile, test/day2.text, test/day3.text, test/test-day1.file.tbl:
* test/test-day3.text, test/test-day4.text:
   + Adjust file contents to reflect their new locations.
e3e5ff1a — Bob Rogers 3 years ago
* day1-recipes.text (removed), day1.text (removed), day2.text (removed):
* day3.text (removed), day4.text (removed), test-day1.day.tbl (removed):
* test-day1.file.tbl (removed), test-day1.item.tbl (removed):
* test-day1.tbl (removed), test-day2.tbl (removed):
* test-day3.text (removed), test-day4.text (removed):
* test-recipes.text (removed), test-show1.text (removed):
   + Renamed all test data . . .
* test/day1-recipes.text (added), test/day1.text (added):
* test/day2.text (added), test/day3.text (added), test/day4.text (added):
* test/test-day1.day.tbl (added), test/test-day1.file.tbl (added):
* test/test-day1.item.tbl (added), test/test-day1.tbl (added):
* test/test-day2.tbl (added), test/test-day3.text (added):
* test/test-day4.text (added), test/test-recipes.text (added):
* test/test-show1.text (added):
   + . . . into a new "test" subdirectory.
44cea086 — Bob Rogers 4 years ago
Add an "include" directive for recipe files.
   This also incorporates some changes to meals.pl command-line options.
   From the recipe-include branch.
* Food/Item.pm:
   + Add file_name and line_number slots, for generating grep format.
   + (parse_recipes $store_item):  Add $file & $line params, initialize
     the file_name and line_number slots if passed.
   + (parse_recipes $parse_file):  Check for duplicate files.
     Pass $file & $line when storing recipes & items.
   + (show_item_details):  Move this into a method.  Include the gram
     contribution of each item.  Bug fix:  Assume one serving if the
     recipe has no declared number of servings.
* Food/Meal.pm:
   + (parse_meals):  Make the "Can't find ..." messages show the file &
     line number.  Include recipe files.
   + (plot_meal_data):  New method.
* Food/MealFile.pm (added):
   + New class to keep track of meals by file.
   + (produce_summaries):  This now has the summary generation code,
     formerly in the meals.pl main body.
* last-use.pl:
   + Drop spurious command-line options and variables.
   + Add a --by-recipe option, if given read stdin and mark mentioned
     recipes as "interesting" and output in file order in grep format.
   + Document the script, with an example.
* meals.pl:
   + Replace the --detailed and --daily options with a --detail-level
     option that can be one of "day", "meal", "item", or "none" and
     defaults to "none" if any of --show-item, --ingredients-matching,
     --recipes-matching, --plot-calories, or --plot-cho-percent args
     were specified, or "meal" otherwise; and a --file option that
     defaults to false.
   + Accept multiple --recipe-file arguments, parse them directly, and
     remove the default.
   + Use Food::MealFile to store the meal files we've read.
   + Use the plot_meal_data and show_item_details methods.
   + Reorganize the main program to process all input files before
     generating any output.
* makefile:
   + Turn --det into --det=item and add --file where necessary to
     preserve the current test output.
   + (test-day1):  Make sure all the various detail levels work.
   + Use test-recipes.text for test-day2 and test-day3.
   + (test-plot):  New test for --plot-cho and --plot-cal.
* test-show1.text:
   + Changed --show output with gram contributions.
* test-day1.day.tbl (added), test-day1.file.tbl (added):
* test-day1.item.tbl (added):
   + More test output using different levels.
* test-recipes.text (added):
   + Add a much-abbreviated recipes file.
* day2.text, day3.text:
   + Include test-recipes.text -- day2.text includes it twice.
* test-day1.tbl, test-day2.tbl:
   + Changed test output for "--detail=meal".
* test-day3.text:
   + Changed warning output with file & line number.
d6f7219a — Bob Rogers 3 years ago
Recipe updates since 8-Jan-21.
* basic-ingredients.text:
   + Add items confectioner's sugar and hot chili.
* recipes.text:
   + Add recipes Jan's asparagus and salmon alfredo, Jan's egg roll 3,
     Jan's jambalaya, Jan's maple oatmeal scone 2, Jan's saag paneer 6,
     celery black pepper tofu 2, lentil-chickpea saute, luxurious
     tomato-basil pasta sauce 10, pasta and feta 20, restaurant baingan
     bharta 2, stir-fried broc with fried tofu 14, and stir-fried
     veggies 20.
* commercial-foods.text:
   + Add item 2021 Girl Scout PB cookies.
   + Realized that "Kirkland frozen stir-fry vegetable blend" is really
     the same product as "Kirkland stir-fry vegetable blend", so made
     the latter an alias for the former.
Next
Do not follow this link