# File sprecs-1.rb, line 198
        def convertRecipes(filename) 
                mydata=Array.new
                mydata = getData(filename)
                fp="recipes_hash_marshalled"
                rectext =""           
                aRecipeList=RecipeList.new()
                aCategoryList=CategoryList.new()
                aKeywordsList=KeywordsList.new()
                i=0
                listOfHashes=Array.new
                
                #aRecipeHash=Hash.new
                #aRecipeHash={title => "", category => "", yields => "", ingreds => "", data => "", keywords=> ""}
                while i<= mydata.size-1
                
                                        if isMMstart(mydata[i]) then
                                                  while not isTitle(mydata[i]) and i<=mydata.size-1
                                                                        i=i+1
                                                        end
                                                        if i>mydata.size-1 then print "EOF !!!\n" end
                                                        #print "title "+String(i) + "\n"
                                                        aTitle=Title.new(String(clearTitle(mydata[i])))
                                                        
                                                        # extracts  Categories:          
                                                        while not isCategory(mydata[i]) and i<=mydata.size-1 
                                                                        i=i+1
                                                        end
                                                        
                                                        #print "cat "+String(i) + "\n"
                                                        aCategoryList=clearCategories(mydata[i])
                                                        
                                                        # extracts Servings:                              
                                                                while not isYield(mydata[i]) and  i<=mydata.size-1  
                                                                        i=i+1
                                                        end
                                                        #print "yield "+String(i) + "\n"
                                                        aYield=Yields.new(clearYield(mydata[i]))
                                                        i=i+2
                                                        
                                                        # extracts Ingredients:
                                                        aIngredList=IngredsList.new()
                                                        while (mydata[i] =~ /\w+/ or isMMline(mydata[i+1]))
                                                                
                                                                if (isMMline(mydata[i+1]) and not mydata[i] =~ /\w+/) then
                                                                        i=i+2
                                                                elsif isMMline(mydata[i]) then i=i+1
                                                                else    
                                                                #print "ingrnext "+String(i) + "\n"                                     
                                                                        if not isMMline(mydata[i])
                                                                                #falll mit liste von ingreds
                                                                    if (mydata[i] =~ /,\s+/) then
                                                                    #print mydata[i] + String(i)+" zzzzzzzzzzzzzzzzzzzzzzz\n"
                                                                        mIngreds = mydata[i].chomp.split(/,/)
                                                                        for j in 0..mIngreds.size-1
                                                                                aIngred=Ingreds.new('','','')
                                                                          aIngred=splitIgredients(mIngreds[j].chomp, mydata[i+1].chomp)
                                                                          aIngred.ingprint
                                                                                                aIngredList.append([aIngred.name, aIngred.set, aIngred.type])
                                                                        end
                                                                    else   
                                                                                        aIngred=Ingreds.new('','','')
                                                                #               print mydata[i] + String(i)+" zzzzzzzzzzzzzzzzzzzzzzz\n"
                                                                                        aIngred=splitIgredients(mydata[i].chomp, mydata[i+1].chomp)
                                                                                        if not aIngred.isempty then
                                                                                                aIngredList.append([aIngred.name, aIngred.set, aIngred.type])
                                                                                        end
                                                                                        aIngred.ingprint
                                                                                end
                                                                                 
                                                                                        i=i+1
                                                                        else
                                                                         i=i+1
                                                                        end                    
                                                                end # if
                                                        end              #while
                                                        
                                                                
                                                        #print "ingr_end "+String(i) + "\n"              
                                                        #        extracts recipe text:
                                                        rectext=""
                                                        while not mydata[i] =~ /:[\w;\d; ]+/ and i<=mydata.size-1
                                                                        rectext << String(mydata[i].chomp)
                                                                                i=i+1
                                                        end
                                                                        #print "rectext_end "+String(i) + "\n"         
                                                        aRecData=Recdata.new(rectext)
                                                                                                                
                                                        #        extracts Keywords:
                                                        while (isKeywords(mydata[i]) and i<=mydata.size-1 and isMMend(mydata[i]) )
                                                                i=i+1
                                                        end
                                                        #print "stichworte_end "+String(i) + "\n"        
                                                        if  isKeywords(mydata[i])  then
                                                                aKeywordsList=clearKeywords(mydata[i])
                                                                #print "KWList "+String(i) + "\n"
                                                        end
                                                
                                                aRecipe=Recipe.new(aTitle,aCategoryList,aYield,aIngredList,aRecData,aKeywordsList)
                                                aRecHash=Hash.new(nil)
                                                
            #puts aRecipe.title.name.inspect

            #aRecHash={"title"=>aTitle,"category"=>aCategoryList,"yields"=>aYield,"ingreds"=>aIngredList,"data"=>aRecData,"keywords"=>aKeywordsList}
            aRecHash={"title"=>aTitle.name,"category"=>aCategoryList.catlist,"yields"=>aYield.nr,"ingreds"=>aIngredList.inglist,"data"=>aRecData.text,"keywords"=>aKeywordsList.keylist}
                                                #puts "hier ist ein RecHash"
            #puts  aRecHash.inspect
            aRecipeList.append(aRecipe)
                                                listOfHashes.push(aRecHash)
            
                                                #aRecipeHash={title => aTitle, category => aCategoryList, yields => aYield, ingreds => #aIngredList, data => aRecData, keywords=> aKeywordsList}
                                                                        
                                                                                
                                                
                                        end
                                         #print "Ende "+String(i) + "\n"
                                         i=i+1
                end  #while i<= mydata.size-1
                #File.open(fp, "w") do | fp | Marshal.dump(aRecipeList, fp) end
                puts listOfHashes.inspect
    marshallData(listOfHashes, "recipes_hash_marshalled")
    @reclist=aRecipeList
                
        end