Skip to content

Add recipe import from free-text ingredient lists (#7) - #49

Merged
rwestergren merged 1 commit into
mainfrom
import-recipe
Aug 30, 2026
Merged

Add recipe import from free-text ingredient lists (#7)#49
rwestergren merged 1 commit into
mainfrom
import-recipe

Conversation

@rwestergren

Copy link
Copy Markdown
Owner

Mirrors the app's "Import Recipe": ingredient lines are handed to Cronometer's parser, which matches each to a database food and converts stated amounts to grams, so callers don't need food IDs up front.

The import is the API's one async job -- import_recipe returns a future id and poll_async_result is polled until it attaches a result. Matched ingredients are then persisted through the existing create_recipe path. Lines the parser can't resolve are reported separately instead of failing the whole batch on create_recipe's gram validation.

Mirrors the app's "Import Recipe": ingredient lines are handed to
Cronometer's parser, which matches each to a database food and converts
stated amounts to grams, so callers don't need food IDs up front.

The import is the API's one async job -- import_recipe returns a future
id and poll_async_result is polled until it attaches a result. Matched
ingredients are then persisted through the existing create_recipe path.
Lines the parser can't resolve are reported separately instead of
failing the whole batch on create_recipe's gram validation.
@rwestergren
rwestergren merged commit 7461886 into main Aug 30, 2026
1 check passed
@rwestergren
rwestergren deleted the import-recipe branch August 30, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant