def healthySubIngredient(ingredient, substitution='', carb=False, fat=False): if substitution: newIng = parsing.parseIngredient({"name": substitution, "amount": ""}) elif carb: newIng = parsing.parseIngredient({ "name": 'low carb ' + ingredient.descriptor + ' ' + ingredient.name + ', ' + ingredient.preparation, "amount": "" }) elif fat: newIng = parsing.parseIngredient({ "name": 'low fat ' + ingredient.descriptor + ' ' + ingredient.name + ', ' + ingredient.preparation, "amount": "" }) newIng.unit = ingredient.unit newIng.amount = ingredient.amount return newIng
def healthySubIngredient(ingredient, substitution = '', carb = False, fat = False): if substitution: newIng = parsing.parseIngredient({"name":substitution, "amount": ""}) elif carb: newIng = parsing.parseIngredient({"name": 'low carb ' + ingredient.descriptor + ' ' + ingredient.name + ', ' + ingredient.preparation, "amount": ""}) elif fat: newIng = parsing.parseIngredient({"name": 'low fat ' + ingredient.descriptor + ' ' + ingredient.name + ', ' + ingredient.preparation, "amount": ""}) newIng.unit = ingredient.unit newIng.amount = ingredient.amount return newIng
def healthySubIngredients(ingredient, substitution): newIng = parsing.parseIngredient({"name": substitution, "amount": ""}) newIng.amount = ingredient.amount newIng.unit = ingredient.unit return newIng
def healthySubIngredients(ingredient, substitution): newIng = parsing.parseIngredient({"name":substitution, "amount": ""}) newIng.amount = ingredient.amount newIng.unit = ingredient.unit return newIng