Chobbes / org-chef

A package for making a cookbook and managing recipes with org-mode.
MIT License
327 stars 33 forks source link

Import nutritional values #6

Open ghost opened 6 years ago

ghost commented 6 years ago

Some sites (like allrecipes) site nutritional values for their dishes, like this one: https://www.allrecipes.com/recipe/13041/my-best-clam-chowder/

It would be really nice to have that information, possibly in a table or so :)

Chobbes commented 6 years ago

100% agree. This has been on my radar as well.

How would people like this information to be placed in org? Can you give an example of what you would hope for it to provide? You mentioned a table, which is a definite possibility. I was almost thinking of just storing it in the property drawer, but I'm not sure if that's any worse or better.

Ideally I want to put it into a format that would be easy to use later on for calorie counting / nutrition tracking in org, but I haven't really thought of what the best way to do that is --- suggestions welcome :).

I'm wondering, eventually, if it's reasonable to look up nutritional information for ingredients from somewhere (not sure where has this data) so that we can calculate estimated nutritional value for every single recipe, regardless of whether or not the website provides them.

Also +1 for including a recipe in your issue :+1:.

ghost commented 6 years ago

Here's probably how I would have structured it. At the end if the recipes as they look now, add something like:

** Nutritional values

Per serving

| Calories | Fat   | Carbs | Protein |
|----------+-------+-------+---------|
| 501kcal  | 32.7g | 28.4g | 23.9g   |

In the sense to make it easy for calorie counting and possibly referring to other databases such as ESHA would be possible but probably always off because of how (stupidly, imo) measurements are given. In the case of allrecipes, you can specify that you want metric and replace cups etc with grams: https://www.allrecipes.com/recipe/13041/my-best-clam-chowder/ if you press the servings-button (the one that looks like a pie chart), choose metric and press adjust, you'll get (most) measurements in grams and everything is nice and easy to measure. If a site doesn't have that available however, it gets a lot harder. How much clams is a 'can' of clams without the juices? How much does 2 cups of cubed potatoes weigh? The measurements would have to be given in metric or at least weight.

Chobbes commented 6 years ago

Hmmm. I definitely think that if it's going to be a table then it should be transposed. Might have more nutritional information, like %DV of vitamins.

This does definitely relate to issue #4 as well. Being able to convert to things by weight and whatnot will be important.