A recipe is a named dish split into servings, built from ingredients that each carry their own nutrition. You log it one serving at a time, and the serving's calories and macros come from what went into the pot.
Each line is split into a quantity, a unit or portion phrase, and the food. Then:
This is the same algorithm as the project's command-line tool, ported line for line and held to the same acceptance tests.
The review screen shows every line beside the food and gram weight it was matched to. Tap a line to pick a different food; the line is re-matched against that food's portion labels, then its first portion, then 100 g, so it always resolves. Ingredients can also be added from the ordinary food search while editing a recipe.
An ingredient counted rather than weighed, such as a scoop with no gram weight behind it, contributes its calories and macros to the recipe but not its grams. Counting a stand-in weight made dishes look heavier than they were and diluted every per-gram figure. The export marks such ingredients so a reader can tell.
A recipe appears in food search like any other food, with "1 serving" as its natural portion. Per-100 g values are derived from the totals so other portions work too. Recipes, like custom foods, are always included in an export, whatever timeframe you choose, because a diary is unreadable without the definitions it refers to.
See also: Diary and foods.