[mythtv-users] MythRecipe source code

Christopher Flynn flynnguy at gmail.com
Mon Nov 8 20:01:27 UTC 2004


Ok, so there seems to be enough interest and everyone seems to think a
rewrite of the sql structure is in order. So let's start with the sql
and get a good database structure and then we can move onto the actual
program to access the data. First let me say that I think this
database should be seperate from the mythconverg database that way we
can backup the recipes and not the mythtv stuff and vice versa. Plus I
think it will be a little cleaner that way and possibly allow you to
even put the mythrecipe database on a seperate computer.

Now, I am thinking something like this for the header info:
title, mainIngredient, source, serves, rating & recID.
Most of which should be pretty self explanatory, recID is just a
unique primary key for each recipe. The end user will not see this. Is
there anything else people would like to see included in the heading?

Now for the ingredients:
qty, amt, des, recID, ingID
For something like 1 cup flour it would be as such:
qty: 1
amt: cup
des: flour
the recID would like this ingredient to a specific recipe and ingID
would be the primary key for each ingredient again, these 2 items
would not be used by the end user. The only other thing I could see as
possibly being useful would be an order field so we could make sure
ingredients show up in a certain order. (Which can sometimes be
important)

Then for the directions section, we would have:
directions, recID, dirID
Here directions would be a large text field that you could enter
whatever you want into.

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.

All of this allows things to be very customizable I think. There are
advantages and disadvatages to having a required name for the amt
field. If we did have one I would make it easy to add one.

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.

Also let me know what you would like to see included. Perhaps images
of recipes as an option? And we still need someone who is familiar
with mythtv and writing plugins. I started to look at it and I could
probably eventually figure it out but I have a feeling it would take
me a long while. It would be nice if we had someone who know what was
going on even if they only gave me a few nudges.
-Chris

-- 
You must be the change you wish to see in the world. - Gandhi


More information about the mythtv-users mailing list