I was finally able to work on the import command that will create the plated recipe database for mealplanner.

First, though I had to fix a bunch of issues with the two Tauri plugins I created. Once they worked and I could invoke a mealplanner command, see output on the CLI properly, and get clear error messages when something went wrong, I worked on the import command.

It’s pretty straightforward really. I already have some code that imports a Plated PDF, the import command just creates a database using the output path specified on the CLI, then imports every PDF in a given directory.

The real challenge was trying to get the import code to work with every type of Plated PDF the company produced. The initial code I wrote only handled one format, so the command definitely couldn’t import everything on the first go.

I fixed a couple issues and discovered there are maybe three different formats/layouts I have to worry about:

Recipe Format 1 Recipe Format 2 Recipe Format 3

Though I haven’t looked through all ~450 files so maybe I missed some… Anyway, next time I work on mealplanner it’ll be adding some tests for the import code for the recipes that can’t currently be imported. Gonna do that until every Plated recipe (minus the ones that are just JPGs) is imported.