MealMaster: Decoding text file format to database
Re: MealMaster: Decoding text file format to database
I just found fdx files with multiple receipes inside.
Tomorrow I'll implement this.
Good night,
Bernd
(0:53am)
Tomorrow I'll implement this.
Good night,
Bernd
(0:53am)
Re: MealMaster: Decoding text file format to database
Hi Fangbeast,
I changed my code above:
Fixed FDX multiple recipes in one file.
Tried to fix RecipeML title for ingredients.
But since I have no file with this constellation, I can not test it.
About MealMaster:
we should have it, since it is the most used one.
About FDX:
should I extract the pictures in an extra directory ?
Bernd
I changed my code above:
Fixed FDX multiple recipes in one file.
Tried to fix RecipeML title for ingredients.
But since I have no file with this constellation, I can not test it.
About MealMaster:
we should have it, since it is the most used one.
About FDX:
should I extract the pictures in an extra directory ?
Bernd
- Fangbeast
- PureBasic Protozoa
- Posts: 4789
- Joined: Fri Apr 25, 2003 3:08 pm
- Location: Not Sydney!!! (Bad water, no goats)
Re: MealMaster: Decoding text file format to database
Bernd, the 'Now You're Cooking ingredients are getting cut apart at the wrong character like this:
Off by 2 characters somewhere?1~me~dium onion; chopped|1~~jalapeno pepper; seeded and chopped,|~~optional|2~~garlic cloves; minced|1~ta~blespoon vegetable oil|4~cu~ps chicken broth|2 15 1/2~ou~nce great northern beans; rinsed and drained|2~ta~blespoons minced fresh parsley|1~ta~blespoon lime juice|1~te~aspoon ground cumin; (1 to 1-1/4)|2~ta~blespoons cornstarch|1/4~cu~p cold water|2~cu~ps cubed cooked chicken
me~dium
te~aspoon
ta~blespoon
cu~p
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
Re: MealMaster: Decoding text file format to database
Should be fixed now.Fangbeast wrote:Bernd, the 'Now You're Cooking ingredients are getting cut apart at the wrong character
(I mixed up two different formats)
Bernd
- Fangbeast
- PureBasic Protozoa
- Posts: 4789
- Joined: Fri Apr 25, 2003 3:08 pm
- Location: Not Sydney!!! (Bad water, no goats)
Re: MealMaster: Decoding text file format to database
infratec wrote:Should be fixed now.Fangbeast wrote:Bernd, the 'Now You're Cooking ingredients are getting cut apart at the wrong character
(I mixed up two different formats)
Bernd
Thank you. I am busy fixing my own bugs before any more updates and so far, it looks good.
Could not have done this without you!
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
Re: MealMaster: Decoding text file format to database
Hi Fangbeast,
next try to fix MealMaster format.
(Code changed)
But I have one recipe which still does not fit:
It has on some lines 3 ingredients.
I don't know what the colon at the start means.
But maybe it is a real malformed recipe.
Bernd
next try to fix MealMaster format.
(Code changed)
But I have one recipe which still does not fit:
At the moment no idea how I should handle this.Title: BLUE CHEESE CHEESECAKE
Categories: Kooknet, Cyberealm, Cheesecake
Yield: 8 " cake
Crust:
2 T Butter or margarine 1 c Cheese crackers, crushed
: Filling: 16 oz Cream cheese, softened
8 oz Blue cheese
3 Eggs 1/4 c Flour 1/4 t Salt
1 c Medium picante sauce
1 c Sour cream 1/2 c Chopped green onions 1/2 c Chopped walnuts
: Garnish:
: chopped parsley
: tomato roses
: chopped green onions
Preheat oven to 325 deg. Butter 8-inch springform pan; sprinkle
cracker crumbs on bottom and sides.
etc.
It has on some lines 3 ingredients.
I don't know what the colon at the start means.
But maybe it is a real malformed recipe.
Bernd
- Fangbeast
- PureBasic Protozoa
- Posts: 4789
- Joined: Fri Apr 25, 2003 3:08 pm
- Location: Not Sydney!!! (Bad water, no goats)
Re: MealMaster: Decoding text file format to database
What a job that is. I once found the full specifiactions to the MealMaster file and it scared the hell out of me. The one I uploaded to box.com was the easy version!!!next try to fix MealMaster format. (Code changed)
Probably is malformed. I made some 70 meg import files using the DOS MealMaster last year and then exported them. Then I tried to reimport them and MealMaster was rejecting duplicates or problem recipes from it's own export file so it wasn't perfect either.But I have one recipe which still does not fit. At the moment no idea how I should handle this. It has on some lines 3 ingredients. I don't know what the colon at the start means. But maybe it is a real malformed recipe.
I have 3*70 meg mealmaster export files but am afraid to try to import them as either RecipeMuncher seems to hang overnight when I use the 'commit' functions or the disk is hit just too hard without it.
Got another update to upload tonight, have streamlined just about everything, just building a better export window. Added full screen recipe picture view as well.
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
Re: MealMaster: Decoding text file format to database
Would this fit in with what you want to do? It uses a regex.
Code: Select all
text.s="Crust:"+#CRLF$
text.s+""+#CRLF$
text.s+"2 T Butter or margarine 1 c Cheese crackers, crushed"+#CRLF$
text.s+""+#CRLF$
text.s+": Filling: 16 oz Cream cheese, softened"+#CRLF$
text+"8 oz Blue cheese"+#CRLF$
text+"3 Eggs 1/4 c Flour 1/4 t Salt"+#CRLF$
text+"1 c Medium picante sauce"+#CRLF$
text+"1 c Sour cream 1/2 c Chopped green onions 1/2 c Chopped walnuts"+#CRLF$
If CreateRegularExpression(0,"(.+?\s.+?)(?=\s+\d|$)",#PB_RegularExpression_DotAll|#PB_RegularExpression_MultiLine)
Dim Result$(0)
NbFound = ExtractRegularExpression(0, text, Result$())
For k = 0 To NbFound-1
Result$(k)=Trim(ReplaceString(ReplaceString(Result$(k),#CR$,""),#LF$,""))
Debug Result$(k)
Next
Else
Debug RegularExpressionError()
EndIf
%101010 = $2A = 42
- Fangbeast
- PureBasic Protozoa
- Posts: 4789
- Joined: Fri Apr 25, 2003 3:08 pm
- Location: Not Sydney!!! (Bad water, no goats)
Re: MealMaster: Decoding text file format to database
No idea. regEx's scare me more than srod's used underpants or idle's diseased sheep (or my daughter's smelly socks!!), don't know how to use them without getting a head pain caused by a steel spike through the frontal lobe.Perkin wrote:Would this fit in with what you want to do? It uses a regex.
Brain, hurts, need more brain!
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
- Fangbeast
- PureBasic Protozoa
- Posts: 4789
- Joined: Fri Apr 25, 2003 3:08 pm
- Location: Not Sydney!!! (Bad water, no goats)
Re: MealMaster: Decoding text file format to database
Someone pointed out an accidental oversight in the latest code. I had left references in to a third party library.
Look for the line "XIncludeFile "RecipeMuncher_Windows.pb"", open that file and look for lines that begin with PV_ and delete them and it will work.
I was looking for a way to get option and checkboxgadget colours to work without a library and these options were a good way to go for me locally. Trying to find a way that works WITHOUT using a third party lib so everyone can use this.
Anyone else working on this program to help me out? (Hopeful look)
Look for the line "XIncludeFile "RecipeMuncher_Windows.pb"", open that file and look for lines that begin with PV_ and delete them and it will work.
I was looking for a way to get option and checkboxgadget colours to work without a library and these options were a good way to go for me locally. Trying to find a way that works WITHOUT using a third party lib so everyone can use this.
Anyone else working on this program to help me out? (Hopeful look)
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
Re: MealMaster: Decoding text file format to database
Hi Fangbeast,
I changed my code again:
MasterCook MX2 is added.
But be carefull, the recipe file which I have, has a wrong coded first line.
So I needed to implement a bugfix.
Bernd
I changed my code again:
MasterCook MX2 is added.
But be carefull, the recipe file which I have, has a wrong coded first line.
So I needed to implement a bugfix.
Bernd
- Fangbeast
- PureBasic Protozoa
- Posts: 4789
- Joined: Fri Apr 25, 2003 3:08 pm
- Location: Not Sydney!!! (Bad water, no goats)
Re: MealMaster: Decoding text file format to database
Hello Bernd,Hi Fangbeast,
Do you ever sleep???I changed my code again:
That's great, I was thinking about that.MasterCook MX2 is added.
Is it a file Is sent you that I generated from RecipeMuncher? If so, it's a standard PB XML output.But be carefull, the recipe file which I have, has a wrong coded first line. So I needed to implement a bugfix.
Or is it a recipe I sent you that I found on the internet?
P.S. It's getting harder to find recipes to download, they all seem to be duplicates of each other.
I haven't been able to find any more FDX recipes except for the first 5. I wanted to implement base64 encoding and decoding for RecipeMuncher XML files and wanted more samples.
The 5 FDX files I had, contained thumbnail sized gif pictures when extracted. Not terribly brilliant.
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
- Fangbeast
- PureBasic Protozoa
- Posts: 4789
- Joined: Fri Apr 25, 2003 3:08 pm
- Location: Not Sydney!!! (Bad water, no goats)
Re: MealMaster: Decoding text file format to database
Hello Bernd. The latest version with your new MasterCook 2 import has been tested and uploaded.
Been testing more with MealMaster and some recipes just go horribly wrong in the ingredients area so I suspect that they were done using a notepad rather than a proper export and we will just have to manually delete bad records.
There aren't many, maybe 1 out of every 50 (that I can see) but I am going to do another mass import tonight and see where the bad records are.
Thanks for all of your hard work. I found some BigOven recipes last night and they work on BigOven for my Android tablet.
Can't find much else that is downloadable, plenty for just copy and paste but I can't stay awake that long.
Been testing more with MealMaster and some recipes just go horribly wrong in the ingredients area so I suspect that they were done using a notepad rather than a proper export and we will just have to manually delete bad records.
There aren't many, maybe 1 out of every 50 (that I can see) but I am going to do another mass import tonight and see where the bad records are.
Thanks for all of your hard work. I found some BigOven recipes last night and they work on BigOven for my Android tablet.
Can't find much else that is downloadable, plenty for just copy and paste but I can't stay awake that long.
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
- Fangbeast
- PureBasic Protozoa
- Posts: 4789
- Joined: Fri Apr 25, 2003 3:08 pm
- Location: Not Sydney!!! (Bad water, no goats)
Re: MealMaster: Decoding text file format to database
. More recipes needed
. Some feedback would be good!
. Has anyone tested RecipeFox and actually got it to work? Does nothing here.
P.s. Should I package and upload the entire 1.64 gig of uncompressed recipes somewhere?
. Some feedback would be good!
. Has anyone tested RecipeFox and actually got it to work? Does nothing here.
P.s. Should I package and upload the entire 1.64 gig of uncompressed recipes somewhere?
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
Re: MealMaster: Decoding text file format to database
yes, I would love to have the full package.Fangbeast wrote: P.s. Should I package and upload the entire 1.64 gig of uncompressed recipes somewhere?
