Skip to content

This is a silly node script that calculates amount of calories for a given combination of ingredients.

License

Notifications You must be signed in to change notification settings

sndvll/emilkcal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EMILKCAL

This is a silly node script that calculates amount of calories for a given combination of ingredients. "Recipes" is stored as a json file in root/recipes folder (check out the examples) with a simple structure that only needs the amount of the ingredient, the weight in grams and and the kcal per 100g for the given ingredient.

Usage:
$ npm install
$ npm start fusk_bea 80
> Total kcal for 80 g of fusk_bea is: 105

First arg is the name value in the recipe json-file, and second arg is the total weighed amount of the complete dish.

This is probably not useful if you want to calculate total calories of a plate of food, but if you make say a Bolognese Sauce and want to now how much 200 grams of said sauce is without to blow your head up with a calculator feel free to use this shit.

Structure of recipes:

{
    name: string;
    ingredients: [
        {
            name: string;
            weight: number;
            kcal_per_100: number;
        }
    ]
}

About

This is a silly node script that calculates amount of calories for a given combination of ingredients.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published