Example #1
0
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
Example #2
0
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
Example #3
0
def healthySubIngredients(ingredient, substitution):
    newIng = parsing.parseIngredient({"name": substitution, "amount": ""})
    newIng.amount = ingredient.amount
    newIng.unit = ingredient.unit
    return newIng
Example #4
0
def healthySubIngredients(ingredient, substitution):
	newIng = parsing.parseIngredient({"name":substitution, "amount": ""})
	newIng.amount = ingredient.amount
	newIng.unit = ingredient.unit
	return newIng