ingredient

Crates.ioingredient
lib.rsingredient
version0.3.0
sourcesrc
created_at2021-02-09 02:56:48.148687
updated_at2023-04-18 21:46:27.065018
descriptionrecipe ingredient parser
homepage
repositoryhttps://github.com/nickysemenza/ingredient-parser
max_upload_size
id352585
size64,570
Nicky Semenza (nickysemenza)

documentation

README

ingredient-parser

crates.io

This leverages nom to parse ingredient line items from recipes into a common format.

demo

ingredient.nickysemenza.com

As an example, 1ΒΌ cups / 155.5 grams all-purpose flour, lightly sifted becomes

{
    name: "all-purpose flour",
    amounts: [
        Measure { unit: "cups", value: 1.25 },
        Measure { unit: "grams", value: 155.5 }
    ],
    modifier: Some("lightly sifted")
}

More examples listed in the docs

Commit count: 315

cargo fmt