Page 10 of 13

Re: Recipe management software?

Posted: Mon Jan 09, 2017 12:55 pm
by Fangbeast
The link below is all the recipes I have from the Living Cookbook forum in FDX importable mode. When imported, they number around the 8,000 mark.

https://www.dropbox.com/s/xw7xwa527hlvr ... ed.7z?dl=0

This link is the current recipes manager project.

http://members.westnet.com.au/bangfeast ... pes%201.7z

If you have trouble with it, just go to my home page

http://members.westnet.com.au/bangfeast/

Re: Recipe management software?

Posted: Mon Jan 09, 2017 2:11 pm
by jack
thank you Fangbeast for the update :)

Re: Recipe management software?

Posted: Mon Jan 09, 2017 9:53 pm
by Fangbeast
jack wrote:thank you Fangbeast for the update :)
It's not much of an update, more a 'make sure it's the current one'.

You should see just how many importable recipes I have lying around. But as for the recipe program, I stopped working on it for lack of any interest (my family and everyone else). :):):)

Re: Recipe management software?

Posted: Mon Jan 09, 2017 10:11 pm
by Keya
Fangbeast wrote:You should see just how many importable recipes I have
Ahh, but how many can you cook? ........... {silence} :D

Re: Recipe management software?

Posted: Mon Jan 09, 2017 10:19 pm
by normeus
Even if you are not into cooking you should download Fangbeast's program.
The best way to learn a programming language is to read other peoples programs and you will enjoy Fangbeast's heavy use of comments!

( I haven't tried making a single recipe so I cannot testify about the quality of the sausage but
I read something about goats on his previous postings so just beware :wink: )



Norm

Re: Recipe management software?

Posted: Mon Jan 09, 2017 11:07 pm
by Fangbeast
( I haven't tried making a single recipe so I cannot testify about the quality of the sausage but
I read something about goats on his previous postings so just beware :wink: )
Currently, the standard database is holding 7,954 recipes, 20 of which are goat (Cue the evil laughter).

These recipes are just the ones I get from the Living Cookbook forum and I have a lot more I found elsewhere with who knows how many more goat in it (heheheheheh)

**UPDATE** Just updated the database with my other collected Living Cookbook recipes and I have 44,984 with more than 100 entries witht he word 'goat' in them (VERY EVIL GRIN!)

Have to rewrite a few portions of the program to strip pictures into a subdirectory rather than stored in a table as the database crawls at around 150,000 recipes with pictures. But that will have to wait for a while.

Re: Recipe management software?

Posted: Fri Feb 24, 2017 6:13 am
by Fangbeast
Could some kind soul whip up a SIMPLE example of using the vector library to print a recipe?

Fields on the left, photo on the right, memo on the bottom?

I have a feral goat brain and really need the example. And it has to be simple or I will go back into the corner and play with Idle's abused sheep collection (that srod did evil, twisted things to). Can't blame Sparkie, he isn't around!

Re: Recipe management software?

Posted: Sun Feb 26, 2017 9:45 pm
by infratec
Hi,

why you don't use CDPrint from collectordave?
It should do what you need.

Bernd

Re: Recipe management software?

Posted: Mon Feb 27, 2017 2:28 am
by Fangbeast
infratec wrote:Hi,

why you don't use CDPrint from collectordave?
It should do what you need.

Bernd
Because I don't remember seeing it? I am getting old and forgetful you know. Will find it and look at it.

Still need to learn how to do this myself:):) (And haven't finished the ultimate table structure yet)

Re: Recipe management software?

Posted: Mon Feb 27, 2017 7:22 am
by collectordave
Hi fangbeast
Because I don't remember seeing it? I am getting old and forgetful you know. Will find it and look at it.
If you send me the basic database with just a few records and some idea of how you want the recipes to be printed I will write you a procedure to print them using CD Print.

If you just want to see what it does I have started a small pdf to attempt to explain how to use it here https://www.dropbox.com/s/b3lbilsp10fd5 ... t.pdf?dl=0

The link to the topic for cd Print is here http://www.purebasic.fr/english/viewtop ... 12&t=67703

I have also included CDPrint in the photo database and others to show it's use.

If I can be of any further assistence please let me know.

Kind Regards

cd

Re: Recipe management software?

Posted: Mon Feb 27, 2017 8:22 am
by collectordave
Sorry for the second reply here.

I read somewhere on the forum that you were looking for a way to allow your users to select recipes based on selected ingredients. Where the list of user selected ingredients could be more than one.

Assuming that you have organisede the database like this.

Table 1: Recipes Fields RecipeID,[Field2],[Field3]

Table 2: Ingredients Fields IngredientID,Name Of Ingredient

Table 3: RecipeIngredient Fields RecipeID,IngredientID

Table 3 being what I call a link table but maybe called a transaction table or somesuch.

Then you need to use SubQueries to get a list of recipes using the ingredients. Example for the above below:
SELECT *
from RecipeIngredient
where IngredientID = 1 IN
(
select RecipeID
from RecipeIngredient
where IngredientID = 2
);
This will return a list of recipeID's of recipes that include both Ingredients 1 and 2. It will also return an IngredientID which will always be 1 which is of no use. Then use a simple main query on your database based on the list returned such as :

SELECT * FROM Recipes WHERE RecipeID = [Value returned from Query 1]

This is of course simplistic as you will at that time want to return the whole list of ingredients so would use something like
SELECT Recipes.RecipeID,Title,RecipeIngredient.Amount,Ingredients.IngredientID,Ingredients.Name
FROM Recipes
LEFT OUTER JOIN RecipeIngredient on Recipes.RecipeID = RecipeIngredient.RecipeID
LEFT OUTER JOIN Ingredients ON Ingredients.IngredientID = RecipeIngredient.IngredientID
followed by the where clause.

This should speed it up a bit as the recipeID field could be indexed. Indices being I believe the way to get speed from a database.

You also mention images. I also found that storing the actual image in the database to create a really bloated database so I store a 150 X 150 or 200 X 200 thumbnail in the database along with the filename of the original image. This allows me to show a simple image in the display window and then print the original image from the filename. Printing an image from a filename is one of the capabilities of the CDPrint module.

If any SQL experts can improve the above please let me know as I have a project running which needs to do a similar thing.


Hope this helps a little.

Regards

cd

PS If you prefer a small coded example I can knock one up for you as I had to do a little of the code to get this far?

Re: Recipe management software?

Posted: Mon Feb 27, 2017 10:57 am
by collectordave
Hi fangbeast

Read this
Okay, I am freezing any further work on this until I can figure out if I can re-engineer this into a multi-language application without making it too complicated or stuffing it up (what I always do!!) unless people have some more ideas for me.
Faced same complications for a programme so wrote a localiser application. Can be found here http://www.purebasic.fr/english/viewtop ... hilit=tool

Basically creates a language file for your application in a resources folder and you simply supply the translations.

If you need further help let me know.

Regards

cd

Re: Recipe management software?

Posted: Mon Feb 27, 2017 11:01 am
by Fangbeast
I read somewhere on the forum that you were looking for a way to allow your users to select recipes based on selected ingredients. Where the list of user selected ingredients could be more than one.
No, that one was sorted a year or more ago with Infratec's help and lots of hard work from me. Amazing I get anything done at all:):)

Re: Recipe management software?

Posted: Mon Feb 27, 2017 11:05 am
by Fangbeast
Faced same complications for a programme so wrote a localiser application. Can be found here
it's not the multilanguage that is a problem so much, it's that I never designed the program with languages in mind so after 43,000 lines of code, it's not so easy to backwards engineer it without reducing it to spaghetti.

When I have finished working out how to properly normalise the database structure (rather than potentially millions of duplicates), I will try to do it properly with multilanguage in mind.

When I first broached the subject many, many years ago (Damn, it makes me sound old), Freak kindly posted the method they used in PB and I tried it and much to my surprise, it worked. AKA, I didn't stuff it up too badly :):):)

But thanks for the offer.

Re: Recipe management software?

Posted: Mon Feb 27, 2017 11:37 am
by collectordave
Hi fangbeast

The idea of the tool is that it doesn't mind whether you had multilanguage in mind it will scan all your files for literal strings and offer them to you for translation. So write ahead and use when finished. There are just a few tricks you can use to makle it easier to convert but you have to start with them in mind. The tool also includes a module for inclusion to allow your users to choose the language for the programme when running.

If I can help with the normalisation give me a shout. I have just abnout finished the example of selecting records based on ingredients as well if interested.

Regards

cd