7 releases

0.3.0 Apr 18, 2023
0.2.0 Dec 18, 2021
0.1.4 Nov 12, 2021
0.1.3 Mar 27, 2021
0.1.2 Feb 20, 2021

#1348 in Parser implementations

Download history 4/week @ 2024-02-23 2/week @ 2024-03-01 1/week @ 2024-03-08 6/week @ 2024-03-15 47/week @ 2024-03-29

54 downloads per month

MIT license

55KB
1.5K SLoC

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

Dependencies

~3.5MB
~66K SLoC