Some nutrition metadata would be interesting to display and compute depending on the servings.
Quick and easy way
Support a new metadata tag and divide it by the number of servings.
Format proposal in recipe metadata:
---
servings: 1
# "Just" iterate over every entry in "nutrition" list and process it like ingredient quantities.
nutrition:
- 100%kcal
- 1%g of proteins
- 1%g of lipids
- 1%g of sugars
- 1%g of fibers
---
Expected result for 3 servings:
- 300 kcal
- 3 g of proteins
- etc.
Note: One could imagine other usecases than "nutrition" data alone. A more generic way to handle such data could be useful but I don't have idea regarding a proper naming... -_-'
Longer but more user friendly way
Integrate with the db format of cookcli-report to define the data for each ingredient and compute the values adding the data of all ingredients in the recipe. It could however have side effect for ingredients not actually integrated in the result such as cooking oils but one would only have to reduce the metadata for such ingredients in his database.
Some nutrition metadata would be interesting to display and compute depending on the servings.
Quick and easy way
Support a new metadata tag and divide it by the number of servings.
Format proposal in recipe metadata:
Expected result for 3 servings:
Note: One could imagine other usecases than "nutrition" data alone. A more generic way to handle such data could be useful but I don't have idea regarding a proper naming... -_-'
Longer but more user friendly way
Integrate with the db format of cookcli-report to define the data for each ingredient and compute the values adding the data of all ingredients in the recipe. It could however have side effect for ingredients not actually integrated in the result such as cooking oils but one would only have to reduce the metadata for such ingredients in his database.