A modelling experiment that may or may not be useful. This repository contains common ingredients, recipes, a way to map them together, and meta data for preparation.
Once common recipes are mapped, can potentially:
- generate a shopping list from a quick selection
- warn about expiration date clashes in shopping list
- hook list into grocery delivery APIs
- run time optimization algorithms for multiple recipes
Currently locked in this repo.
All data is pure JSON, but illustrated here in javascript with comments:
{
"basil": {
"unit": "g", // measurement unit used in amounts
"types": { // complete list of types and associated values
"fresh": {
"size": 31, // amount of units found in container
"container": "pack" // can be used as shorthand unit e.g. "unit": "pack"
},
"dried": {
"size": 10,
"container": "jar"
}
},
"default": "dried" // default type in types object
}
}
size
+container
can be lifted if they are equal for alltypes
, e.g. sugartypes
can be an array of keys if everything can be liftedunit
+container
can be left blank or set tonull
ifcontainer === name
, e.g. bananas.