[Devember 2021] Cookbook software

Greetings.

My plan for this year is as follows:

  1. Make a basic software that reads cooking recipe’s text. The recipes would have a bunch of tags, like ingredients, cooking method, etc.

  2. Make a search engine, that runs through multiple tags and finds a recipe based on a tag, be it specific ingredient, cooking method, time or whatever.

  3. A way to save your own recipes, add extra tags, that aren’t available yet, maybe upload pictures, cause I am not entirely sure as to how to do the picture thing.

  4. And this is optional:
    If the things are going well I may do an online server that stores all the recipes, so you can read recipes other people post and you can post recipes other people can read…

So that is the plan.
I am planing to begin working on 1 and 2 about the same time since they are pretty much connected.

7 Likes

good plan!! This was actually my plan but definitely with #4 and with login capability.

My grandma made a cookbook for each of her decedents. I wanted to create a database with the cookbook text with searchable tags and create the ability for family members to upload new recipes and share them with each other.

Dang :sweat_smile: guess I have to find something else for devember

2 Likes

I dare ya to do it. The we compare d… coockbooks…

You know what worries me? Should I put tomatoes and avocados in the vegetables category or fruits? Cause they are technically fruits.

Nice idea. I like the concept of tags, precisely because you are more flexible than with categories. If you can not decide between two tags then you can just use both and the thing will show up whether you filter it one way or the other.

So you plan to make this using some web tech?

1 Like

First I’m gonna do it offline. Since I never actually programmed anything online I don’t even know where to start with it.
I would use a 2D videogame engine, named Game Maker Studio, cause it’s simple to program and have insanely detailed documentation, so I can play with it.
When I am done with the offline part I will check out the online stuff and see if I can even remotely understand what is going on…
BTW there is someone else on the forum who is doing the same thing as me for his wife and one other guy who wanted to do the same, but he gave up I think, cause there are too many cooking recipe things going on :joy:

Funny that you are doing it in a game engine. That is my fallback plan. I already (re-)wrote my Twitch bot in a game engine (love2d) and the other idea I had for Devember was to improve on that or re-rewrite it.

I have not worked with GMS but my guess is that it is not a good fit for a server. You will most likely want to use something else for that part.

1 Like

GMS is for the “user” part.
The engine itself is used for games like Stardew Valley, Hotline Miami and a bunch of other pixel art games. It’s good on e you get a hang of it and it has quite good capabilities. I mean Stardew Valley is supe complex animal and GMS does it justice.
Anyways, I’ll be starting one of those days.

BRAINSTORMING SESSION:

So let’s try this… I will have a list of recipes. Each recipe would have a number ID, so let’s say pizza is 1, foucacia is 2, bread is 3 and so on…
Then each of those would have it’s own list of ID numbers for ingredient tags, like 100 is veggies, 200 is sauces, 300 is starch, 400 is protein and so on. So I may have something like 124, that may be olives for example… 210 is tomato sauce and stuff like that…
So the recipe 1 could have tag 210 and tag 124 for tomato sauce and olives…

So at the end of the day I when I search or save recipes in the list I will just save a bunch of numbers. Searching would be waves easier with numbers as well. I won’t have to spell check and so on. Run the list and find all recipes tagged with 210 (tomato sauce) and be done with it.

Will have to do a bunch of drop down menus and stuff, but other than that - it’s just gonna be a bunch of lists throwing data at each other…

1 Like

Usually tags are just the text strings directly. Sure you can have multiple tags with slightly different spelling, but that comes with having user defined tags. I don’t think you can escape that if you map strings to numbers.

Also usually with tags you use filters rather than a search. So you start with a big list and narrow it down by adding stuff to your filter. For example you have 100 recipes, then add tomatoes and it shows only 30 recipes. Add pasta to the filter and you have only 20 left and so on.

This is how I would expect a tag-based recipe book to work. Not saying that it needs to be done like that.

1 Like

I am thinking more about how I am going to program the internal workings of the engine.
My guess is GMS have some tag and list searching system, but I want to do it myself.

Yes, the user will see “tomato sauce”, but the system will see 210. It will just run a list of numbers (with all recipes) and throw another list, that have 210 as tag (tomato sauce in the recipe).
My idea is to have a bunch of tags you can select as user and not really type anything, so that should cover misspellings and stuff…

Yes, I guess we are just using different words for the same thing. It’s true, cause I literally mean the engine will search for all recipes with certain tag, while you say it will filter out the recipes with certain tag :joy:

But again, I am thinking about the inside working of the algorithm.
I’m also thinking of implementing drop down menus so you literally just click on the products and the engine will give you the results…

For a little motivation, this is the one I currently use which has a great parser for importing from the web:

And this one from nextcloud will scan PDFs:

2 Likes

Quite possible :]

I personally like to think in terms of data structures and what this will mean for the various operations. Just as an example:
Variant A: A list of recipes where each recipe has a list of associated tags.
Variant B: A list of tags where each tag references a recipe.

And then think of the operations you want to do on that data and which implications the data structures would have on the operations.
This to me is the fun stuff. No actual coding at first, just a what-if game where you try to find the most optimal (by some metric like programming effort or performance) data structures for your specific use case.

I think what you have in mind is variant A with the additional step of associating strings to numbers.
Can you think of another way how the data could be organised?

1 Like

Well, I could do B, but that would mean a tag of onions will have a million things on it’s list, while a tag of ocra will have 2… Easy to search tho, cause I have a single tag lists already there. It will need a lot more work for saving a new item tho. At that point I would have to run through all the tags and add the recipe to the ones, that are used.

I don’t know… I can try a make a giant text editor where I don’t play with any tags and stuff. There is just text. But then I would have to scan the entire text of all recipes if you want to search for recipes with chicken and potatoes. That would be mistype and misspelling insanity…

BTW this is a hobby, I am not professional, so I don’t know how data can be organized and what options are there…