nextcloud / nextcloud/cookbook
Add tools database
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 641
- Forks
- 113
- Avg merge
- 21h 31m
- Merged PRs (30d)
- 26
Description
Analogous to an ingredient database, see #135, a database for tools required for a recipe should be introduced.
This would allow for enhanced filtering of recipes, like
- "Show all recipes that use a cookie cutter"
- "Show all recipes that need only one pan"
- "Hide all recipes that would require an oven"
- etc.
A similar structure for the database, management, UI, ... as for the ingredients could be used.
Here is some JSON based on the discussion #1874:
Shortened JSON
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Recipe",
// ...
"tool": [
{
"@type": "HowToTool",
"identifier": "b3c0d2ff-009c-423e-89e8-e0245d027006",
"name": "large skillet",
"description": "",
"requiredQuantity": {
"@type": "QuantitativeValue",
"value": 1,
"unitText": "unit",
"unitCode": "C62"
}
},
{
"@type": "HowToTool",
"identifier": "b3c0d2ff-009c-423e-89e8-e0245d027006",
"name": "bowl",
"description": "ca. 500 ml",
"requiredQuantity": {
"@type": "QuantitativeValue",
"value": 1,
"unitText": "unit",
"unitCode": "C62"
}
},
{
"@type": "HowToTool",
"identifier": "e015a3fb-ca67-4890-9ec7-05359828fa0c",
"name": "baking dish",
"requiredQuantity": {
"@type": "QuantitativeValue",
"value": 1,
"unitText": "unit",
"unitCode": "C62"
}
},
],
"recipeInstructions": [
{
"@type": "HowToSection",
"position": 1,
// ...
"itemListElement": [
{
"@type": "HowToDirection",
// ...
"tool": [
{
"@type": "HowToTool",
"identifier": "b3c0d2ff-009c-423e-89e8-e0245d027006",
"name": "large skillet",
"description": "",
"requiredQuantity": {
"@type": "QuantitativeValue",
"value": 1,
"unitText": "unit",
"unitCode": "C62"
}
}
]
},
{
"@type": "HowToDirection",
"position": 2,
// ...
"tool": []
}
]
},
{
"@type": "HowToSection",
// ...
"itemListElement": [
{
"@type": "HowToDirection",
// ...
"tool": [
{
"@type": "HowToTool",
"identifier": "b3c0d2ff-009c-423e-89e8-e0245d027006",
"name": "bowl",
"description": "ca. 500 ml",
"requiredQuantity": {
"@type": "QuantitativeValue",
"value": 1,
"unitText": "unit",
"unitCode": "C62"
}
}
]
}
]
},
{
"@type": "HowToDirection",
// ...
"tool": [
{
"@type": "HowToTool",
"identifier": "e015a3fb-ca67-4890-9ec7-05359828fa0c",
"name": "baking dish",
"requiredQuantity": {
"@type": "QuantitativeValue",
"value": 1,
"unitText": "unit",
"unitCode": "C62"
}
}
]
}
]
}
</script>
Full JSON
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Recipe",
"name": "Delicious Lasagna",
"totalTime": "PT1H30M",
"cookTime": "PT40min",
"recipeIngredient": [],
"tool": [
{
"@type": "HowToTool",
"identifier": "b3c0d2ff-009c-423e-89e8-e0245d027006",
"name": "large skillet",
"description": "",
"requiredQuantity": {
"@type": "QuantitativeValue",
"value": 1,
"unitText": "unit",
"unitCode": "C62"
}
},
{
"@type": "HowToTool",
"identifier": "b3c0d2ff-009c-423e-89e8-e0245d027006",
"name": "bowl",
"description": "ca. 500 ml",
"requiredQuantity": {
"@type": "QuantitativeValue",
"value": 1,
"unitText": "unit",
"unitCode": "C62"
}
},
{
"@type": "HowToTool",
"identifier": "e015a3fb-ca67-4890-9ec7-05359828fa0c",
"name": "baking dish",
"requiredQuantity": {
"@type": "QuantitativeValue",
"value": 1,
"unitText": "unit",
"unitCode": "C62"
}
},
],
"supply": [
{
"@type": "HowToSupply",
"identifier": "37d8e801-13fe-4ce9-ba93-6b8a35e6646f",
"name": "ground beef",
"description": "",
"requiredQuantity": {
"@type": "QuantitativeValue",
"value": 0.5,
"unitText": "kilogram",
"unitCode": "KGM"
}
},
{
"@type": "HowToSupply",
"identifier": "887ab19e-97be-43b1-bf20-b423b38eda5a",
"name": "onion",
"description": "diced",
"requiredQuantity": {
"@type": "QuantitativeValue",
"value": 0.5,
"unitText": "cup",
"unitCode": "CU"
}
},
{
"@type": "HowToSupply",
"identifier": "5bea667a-344a-44e9-a842-b6187e95b702",
"description": "minced",
"name": "garlic",
"requiredQuantity": {
"@type": "QuantitativeValue",
"value": 2,
"unitText": "clove"
}
},
{
"@type": "HowToSupply",
"identifier": "f0a77778-5292-4bf4-8be2-4541a1cbd6ee",
"name": "ricotta cheese",
"description": "",
"requiredQuantity": {
"@type": "QuantitativeValue",
"value": 2,
"unitText": "cups",
"unitCode": "CU"
}
},
{
"@type": "HowToSupply",
"identifier": "ce0388ac-617f-4a15-9273-9ba805bf7523",
"name": "shredded mozzarella cheese",
"description": "",
"requiredQuantity": {
"@type": "QuantitativeValue",
"value": 0.5,
"unitText": "cup",
"unitCode": "CU"
}
},
{
"@type": "HowToSupply",
"identifier": "4563b9e4-460b-4325-96f2-9fc5ef349e81",
"name": "salt",
"description": "to taste"
},
{
"@type": "HowToSupply",
"identifier": "6811be83-8282-4851-bb88-749b3be727af",
"name": "pepper",
"description": "to taste"
},
{
"@type": "HowToSupply",
"identifier": "f16704c8-9b3f-4009-b6d1-1ec843e416f3",
"name": "lasagne noodles",
"description": "",
"requiredQuantity": {
"@type": "QuantitativeValue",
"value": 12,
"unitText": "piece",
"unitCode": "C62"
}
}
],
"recipeInstructions": [
{
"@type": "HowToSection",
"position": 1,
"name": "Prepare the Meat Sauce",
"description": "First the meat sauce needs to be prepared. Be aware that this will take a lot of time to get the best result.",
"image": [
"meat_sauce_1.jpg",
"meat_sauce_2.jpg"
],
"thumbnailUrl": [
"meat_sauce_1_thumb.jpg",
"meat_sauce_2_thumb.jpg"
],
"itemListElement": [
{
"@type": "HowToDirection",
"position": 1,
"image": ["ground_beef_in_pan.jpg"],
"thumbnailUrl": ["ground_beef_in_pan_thumb.jpg"],
"timeRequired": ["PT6M"],
"text": "In a large skillet, brown the ground beef and the onions.",
"supply": [
{
"@type": "HowToSupply",
"identifier": "37d8e801-13fe-4ce9-ba93-6b8a35e6646f",
"name": "ground beef",
"description": "",
"requiredQuantity": {
"@type": "QuantitativeValue",
"value": 0.5,
"unitText": "kilogram",
"unitCode": "KGM"
}
},
{
"@type": "HowToSupply",
"identifier": "887ab19e-97be-43b1-bf20-b423b38eda5a",
"name": "onion",
"description": "diced",
"requiredQuantity": {
"@type": "QuantitativeValue",
"value": 0.5,
"unitText": "cup",
"unitCode": "CU"
}
}
],
"tool": [
{
"@type": "HowToTool",
"identifier": "b3c0d2ff-009c-423e-89e8-e0245d027006",
"name": "large skillet",
"description": "",
"requiredQuantity": {
"@type": "QuantitativeValue",
"value": 1,
"unitText": "unit",
"unitCode": "C62"
}
}
]
},
{
"@type": "HowToDirection",
"position": 2,
"image": [],
"thumbnailUrl": [],
"timeRequired": ["PT4M"],
"text": "Add minced garlic and sauté for a few minutes.",
"supply": [
{
"@type": "HowToSupply",
"identifier": "5bea667a-344a-44e9-a842-b6187e95b702",
"description": "minced",
"name": "garlic",
"requiredQuantity": {
"@type": "QuantitativeValue",
"value": 2,
"unitText": "clove"
}
}
],
"tool": []
}
]
},
{
"@type": "HowToSection",
"position": 2,
"name": "Prepare the Cheese Filling",
"description": "Get ready for the cheesy part...",
"image": [],
"thumbnailUrl": [],
"itemListElement": [
{
"@type": "HowToDirection",
"position": 1,
"image": ["cheese_in_a_bowl.jpg"],
"thumbnailUrl": ["cheese_in_a_bowl_thumb.jpg"],
"timeRequired": ["PT2M"],
"text": "In a bowl, combine ricotta cheese, mozzarella cheese, salt, and pepper.",
"supply": [
{
"@type": "HowToSupply",
"identifier": "f0a77778-5292-4bf4-8be2-4541a1cbd6ee",
"name": "ricotta cheese",
"description": "",
"requiredQuantity": {
"@type": "QuantitativeValue",
"value": 2,
"unitText": "cups",
"unitCode": "CU"
}
},
{
"@type": "HowToSupply",
"identifier": "ce0388ac-617f-4a15-9273-9ba805bf7523",
"name": "shredded mozzarella cheese",
"description": "",
"requiredQuantity": {
"@type": "QuantitativeValue",
"value": 0.5,
"unitText": "cup",
"unitCode": "CU"
}
},
{
"@type": "HowToSupply",
"identifier": "4563b9e4-460b-4325-96f2-9fc5ef349e81",
"name": "salt",
"description": "to taste"
},
{
"@type": "HowToSupply",
"identifier": "6811be83-8282-4851-bb88-749b3be727af",
"name": "pepper",
"description": "to taste"
}
],
"tool": [
{
"@type": "HowToTool",
"identifier": "b3c0d2ff-009c-423e-89e8-e0245d027006",
"name": "bowl",
"description": "ca. 500 ml",
"requiredQuantity": {
"@type": "QuantitativeValue",
"value": 1,
"unitText": "unit",
"unitCode": "C62"
}
}
]
}
]
},
{
"@type": "HowToDirection",
"position": 3,
"image": ["lasagna_layer.jpg"],
"thumbnailUrl": ["lasagna_layer_thumb.jpg"],
"timeRequired": ["PT10M"],
"text": "In a baking dish, layer lasagna noodles, meat sauce, and cheese filling.",
"supply": [
{
"@type": "HowToSupply",
"identifier": "f16704c8-9b3f-4009-b6d1-1ec843e416f3",
"name": "lasagne noodles",
"description": "",
"requiredQuantity": {
"@type": "QuantitativeValue",
"value": 12,
"unitText": "piece",
"unitCode": "C62"
}
},
{
"@type": "HowToSupply",
"name": "meat sauce",
},
{
"@type": "HowToSupply",
"name": "cheese filling",
}
],
"tool": [
{
"@type": "HowToTool",
"identifier": "e015a3fb-ca67-4890-9ec7-05359828fa0c",
"name": "baking dish",
"requiredQuantity": {
"@type": "QuantitativeValue",
"value": 1,
"unitText": "unit",
"unitCode": "C62"
}
}
]
}
]
}
</script>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Compare the proposed tools database with the ingredient database in #135, and review the related discussion in #1874. Define the database, management, UI, filtering behavior, and recipe JSON scope; the work is done when tool requirements support the listed filtering examples and the shown schema.
Written by the indexing model from the issue text.
Assessment
- Domain
- database, full-stack
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100