Recipe management software?

For everything that's not in any way related to PureBasic. General chat etc...
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4747
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Recipe management software?

Post 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/
Amateur Radio, D-STAR/VK3HAF
jack
Addict
Addict
Posts: 1336
Joined: Fri Apr 25, 2003 11:10 pm

Re: Recipe management software?

Post by jack »

thank you Fangbeast for the update :)
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4747
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Recipe management software?

Post 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). :):):)
Amateur Radio, D-STAR/VK3HAF
User avatar
Keya
Addict
Addict
Posts: 1891
Joined: Thu Jun 04, 2015 7:10 am

Re: Recipe management software?

Post by Keya »

Fangbeast wrote:You should see just how many importable recipes I have
Ahh, but how many can you cook? ........... {silence} :D
normeus
Enthusiast
Enthusiast
Posts: 414
Joined: Fri Apr 20, 2012 8:09 pm
Contact:

Re: Recipe management software?

Post 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
google Translate;Makes my jokes fall flat- Fait mes blagues tombent à plat- Machte meine Witze verpuffen- Eh cumpari ci vo sunari
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4747
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Recipe management software?

Post 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.
Amateur Radio, D-STAR/VK3HAF
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4747
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Recipe management software?

Post 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!
Amateur Radio, D-STAR/VK3HAF
infratec
Always Here
Always Here
Posts: 6817
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Recipe management software?

Post by infratec »

Hi,

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

Bernd
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4747
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Recipe management software?

Post 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)
Amateur Radio, D-STAR/VK3HAF
collectordave
Addict
Addict
Posts: 1309
Joined: Fri Aug 28, 2015 6:10 pm
Location: Portugal

Re: Recipe management software?

Post 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
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
collectordave
Addict
Addict
Posts: 1309
Joined: Fri Aug 28, 2015 6:10 pm
Location: Portugal

Re: Recipe management software?

Post 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?
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
collectordave
Addict
Addict
Posts: 1309
Joined: Fri Aug 28, 2015 6:10 pm
Location: Portugal

Re: Recipe management software?

Post 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
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4747
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Recipe management software?

Post 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:):)
Amateur Radio, D-STAR/VK3HAF
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4747
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Recipe management software?

Post 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.
Amateur Radio, D-STAR/VK3HAF
collectordave
Addict
Addict
Posts: 1309
Joined: Fri Aug 28, 2015 6:10 pm
Location: Portugal

Re: Recipe management software?

Post 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
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
Post Reply