Rescale a list of ingredients
scale_ingredientsRescale French ingredient lines by factor or servings, marking each line as scaled, rounded, or unscaled.
Instructions
Rescale a list of French ingredient lines, offline. Give either 'factor', or 'from_servings' and 'to_servings' together. Each line comes back with what was done to it: 'scaled' when the arithmetic landed exactly, 'rounded' when the value had to move to stay something a kitchen can measure out, and 'unscaled' when the line carries no quantity at all. Nothing is converted between unit systems, and an approximate measure such as a pincée keeps its own size.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| factor | No | What to multiply the quantities by. Give this, or the two servings counts. | |
| ingredients | Yes | The lines to rescale, as the recipe wrote them. | |
| to_servings | No | How many it should serve. | |
| from_servings | No | How many the list was written for. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | Yes | ||
| factor | Yes | What the quantities were multiplied by. | |
| ingredients | Yes | ||
| scaled_count | Yes | Lines whose arithmetic landed exactly. | |
| rounded_count | Yes | Lines whose value had to move. | |
| unscaled_count | Yes | Lines carrying no quantity. |