Friday, December 2, 2011

Menu planning, automated

Dear fellow busy cooks,

On a good week, I pick out the recipes I want to make and carefully make a list of all the ingredients I need before going to the grocery store.  Of course, picking out the recipes that meet the requirements for a particular week can be difficult.  Sometimes I have twenty minutes to cook a meal three nights, sometimes I can make one meal that takes longer and two shorter meals.  And sometimes I have specific ingredients I need to use up - like pumpkin or turkey.

This sounded like a job for a perl script.  XML was the natural choice for the recipes - and luckily someone had already made an XML schema for recipes.  I made a few changes to it - adding some fields for preparation time, crock pot or not, and a few other things.

How does this script differ from a bunch of the other menu planning tools available?  You can make very specific requests - for instance, 2 meals that have 20 minutes of preparation of time or less and 50 minutes of cook time or less plus 1 meal that has 30 minutes of preparation time or less.  Or you exclude specific ingredients.  Or prioritize an ingredients - like maybe it's the week after thanksgiving and you have some turkey to use up.

My menu planner  takes in  an XML file that defines your preferences.  The preferences file can have as many preference blocks as you want so that you can choose as many distinct sets of recipes as you want.  So if you can have one meal with cheese a week, but the rest have to be cheese free, you can do that.

Need a sample?  Here are 8 meal plans of 3 meals that have twenty minutes of preptime or less - one for turkey leftovers.  :)  Here are 8 meal plans for 2 meals with short prep times and 1 with long prep time.

Feel free to adapt the script.  Or send me your ideal menu plan.  :)

Happy eating!