[mythtv-users] MythRecipe source code
Chris Petersen
lists at forevermore.net
Mon Nov 8 21:13:50 UTC 2004
> Ok, so there seems to be enough interest and everyone seems to think a
> rewrite of the sql structure is in order.
Might want to move this over to the dev list (I didn't, since I don't
know how many people involved in this discussion are there).
> Now for the ingredients:
> qty, amt, des, recID, ingID
way too simplistic. This is part of the problem I ran into with my own
stuff. There are a LOT of recipes out there that have ingredients like:
1 cup plus 2 tbsp flour
or
1 squeeze of lemon or lime
You need to account for complex measurement types as well as substitute
ingredients.
> The other important thing I could see would be a category. For that we
> would have one table be a list of categories with a corresponding ID.
> Then we have a lookup table that links recipes to categories. We can
> then have as many categories assigned to a recipe that we want.
category and keyword. Some people may want to browse by
Dinner -> Entree -> Rice -> Risotto
or
Region -> Italy -> Dinner -> Entree -> Risotto
others might just want to go to keyword "risotto" or "italian", or pull
up all recipes containing both "rice" and "tomato".
> I think having it web based would be important for adding and editing
> and have myth be used to mainly view the recipes. Anyone good with
> php? I know perl but seeing as how the existing mythweb is already
> written in php I would like to see if we could integrate it into that
> if we can.
I've already offered my help, along with the fact that I'm going to
write a web-based recipe database, anyway. Though I also know that what
I want may be overkill for most people.
But here's a summary of what I plan.
- table of ingredients, complete with descriptions, images and
nutritional info
- table of recipes, linked with recipe-ingredients
- indexes for keywords, author/source, contributor (someone who posts
someone else's recipe) and ingredients.
- a category tree not directly linked to recipes (trust me, it's easier
to manage this way), but assigned keywords. Recipes matching those
keywords will show up under that category.
- each recipe/ingredient gets a unique identifier, like a wiki.
My recipe parsing engine is mostly functional (nothing to show -- I was
in the middle of a rewrite of some data structures before I moved, and
it's nonfunctional at the ment). It allows you to take something like:
100 ml + 1 tsp ginger or cinnamon
100 grams whole black peppercorns
1/2 nutmeg, crushed
2 cups water
and will split out measurements and identify ingredients. It will also
allow for unit conversions (between metric and US -- figured that no one
would be using imperial measurements anymore) and automatic scaling.
Anyway, I've put a LOT of thought into this whole setup. Taken ideas
from good sites like recipezaar.com (which I'd use if I didn't just want
a private collection of recipes), and a lot from my own experience (I've
been cooking since I was 4 -- so call that almost 24 years of
experience), and looking over many of the recipes that my wife deals
with for school/work (she's a "pastry culinarian," as they are seemingly
called -- "chef" is management).
Regardless of what happens with mythrecipe stuff, I'll be writing this
program. Figured that it'd be cool to work together with other people,
but I do need the extra complexity that I've written into this design.
My interest is solely on a web-based solution, though. Computers have
no place in my kitchen until they're water- and flour-proof; a printed
recipe card is much easier to replace.
-Chris
More information about the mythtv-users
mailing list