Ingredients Validation Complete

snip of terminal showing ingredient objects parsed from strings

recipe-parsing is complete for Recipe Retriever tool!

Almost there!

I have a lot of grunt work ahead of me to get all the potential units of measure and ingredients added, as well as unit conversion tooling to handle the recipes that will be coming.

But the ability to combine ingredients is now possible, and I’ve seen it working due to the fact that the validator works exactly like expected!


The validator tells me what to do

By now I’ve added kilograms to the list of known units of measure. But I removed it to showcase what I mean. If the validator runs into a unit of measure that it doesn’t recognize, it gets angry and tells me that it didn’t recognize it, and it also tells me which line the unrecognized measure came from, which is helpful in a longer recipe.

The formatting looks a bit weird.

I used :xyz: format to create symbols that I knew I could easily parse from lines from an ingredients list. I know there might be some colons, but not in the patterns that I’ve created to break the ingredient line up into its relevant parts.

Ultimately, copying and pasting from websites where the ingredients are listed isn’t too much work if it’s just one at a time. Then I run the validator to make sure that the program can understand the recipe, and I’ve got a new recipe / ingredient list that can be combined with other items, and make it possible to create a grocery list on the fly, from randomly selected recipes!

Growing the list

Now that all I have left is to pump the combined ingredients out into a markdown file, I’m nearly finished with this project. So the time has come to grow not only my recipe vault but the list of acceptable ingredients and units of measure.

So hopefully by sometime in the summer, I’ll have a very complete and open-source little project available for anyone who likes Obsidian and wants a giant dictionary of terms to parse I’ll have the link available probably on this post, but generally all over the website as this will be my first open-source project I’ll continue to actually use over time.

Previous
Previous

Measurement Specifiers

Next
Next

Playing with WebGL and Angular