MealMaster Recipe Buster (MM_BUSTR) (c) 1996 Glen G. Hosey ---------------------------------------------------------------------------- ADDENDUM (in the wrong place 8-), there are new notes at the end) about errors importing the ".MMF" file this program produces: If you get an error importing a recipe, check out the ".MMF" file before reporting the error to me. If the recipe header shows "---------- Recipe via Meal-Master [Recipe Buster]", this means that the recipe was converted from some other original format (MC, MC Mac, or an unformatted recipe). Please report these errors to me, It's my fault! On the other hand, if the header is a "normal" MM header line, i.e. shows the version number, or is anything other that the header shown above, this means the recipe was originally in MM format and WAS NOT altered! These are errors on the part of the poster, and comments should be referred to them for correction. Most of these errors occur when recipes are exported from another recipe program into MM format, and especially when someone tries to type a recipe into MM format from scratch, and doesn't understand all the little quirks of MM!!! For example the following was extracted from a MM-format recipe in MM-Recipes Digest #335: 1 t dried grated orange rind 1/3 c chopped pecans or currants (optional) 1/4 c Fat-free egg substitute plus 2 tb Fat-free egg substitute Little notes about this: MM will either use "t & T" or "ts & tb" but will NEVER mix the two different formats in a single recipe! I tried! You can enter them in different formats, but the program will change them to the format you specify under "Maintenance". The first letter of all ingredients will ALWAYS be in caps! MM will NEVER allow a line to go past column 39! (actually it restricts an ingredient to 28 chars). So while this was a most admirable effort to type in a recipe in MM format, it contained many errors, of which only the long lines caused import problems! So, pleeze don't report these errors to me, I can't help on these...... And.... thanks to David Schellenberg, who report all the problems with formatting in the BreadBakers list..... (it uses a different message separator line) these are fixed! ----------------------------------------------------------------------------- This program is a result of much frustration with the way listservers format some recipes and the enormous amount of time it takes to pull some recipes out of e-mail, and clean them up prior to import. I think I have covered all angles, but there are always little things that are overlooked, and I would certainly appreciate a response from anyone finding glitches with this program, or suggestions for program improvement. Please mail me at hosey@erols.com and included a copy of the email file where you found an error to assist me in duplicating the problem. 1. What this program will do: a. Takes a single text file, saved from an internet recipe list email and converts it into all MealMaster recipes. b. Converts all MasterCook and MasterCook Mac recipes into MealMaster. c. Converts "unformatted" recipes into MealMaster with very minimal editing of the original file. d. Strips out all the offensive "equal-signs" that sometimes show up at the end of the line. e. Converts those other characters that get changed in some lists (the =B0, =E9, =7F, etc, characters). f. Leaves you with a single file containing nothing but recipes, and a separate text file containing everything else in the original text file, showing where recipes have been cut out. g. Correctly converts the long text lines when MasterCook recipes are exported with "Break up directions and notes" is turned off. These got truncated in MM_CONV. h. Converts most "obvious" header lines into proper MM header line format for import. i. Places lines at the end of each recipe telling which recipe list the recipe came from, along with the original poster's name and the date of the post. j. MasterCook recipes containing "Suggested Wine", "Serving Ideas" and "NOTES" have all these included within the MealMaster recipe. 2. What you need to do to prepare your e-mail file for conversion: a. I would suggest creating a separate subdirectory on your hard drive to save your e-mails into, and doing all the conversions there. b. Save the entire digest e-mail as a text file. To properly add in the "posting" tag line in the recipe, the mail must be saved in one of the following formats: MealMaster Digest: "MM" plus 3 digits for the digest number. (i.e. MM308) MasterCook Digest: "MC" plus 3 digits for the digest (MC271) EAT-L Digest: "EL" plus 4-digit date of the digest (EL1108) CHILE-HEADS DIgest: "CH" plus 3-digit digest number (CH177) Dave's Recipes from around the World: "DAVE" plus 4-digit date (DAVE1208) Fatfree digest: "FF" plus 3-digit digest number (FF210) EAT-LF Digest: "LF" plus 3-digit digest number (EL200) Jewish Food Digest: "JW" plus 3-digit digest number (JW070) Bbq-digest: "BQ" plus 3-digit digest number (BQ050) Gourmet Connection Recipe Page: "GOUR" plus 4-digit date (GOUR1208) MasterCook Digest: "MD" plus 3-digit digest number (MD100) Bread Bakers Digest: "BR" plus 3-digit digest number (MR100) FOODWINE Digest: "FW" plus 4-digit date (FW1207) NOTE: These are all hard-coded now, just some ones that I know about. The next update of the program will have a text resource file allowing you to put in the posting information for any digest. c. HINT: Pay attention to the endings of the recipes which are tagges as {* Exported from MasterCook Mac }, some of these don't have the proper ending of "###" in them, if you find one, just place the 3 pound signs at the end of the recipe. d. TO PREPARE UNFORMATTED RECIPES: (1) Place 5 open brackets ("[[[[[") on the line preceeding the title. (2) If you want to include recipe categories or serving amounts in the recipe, place them on lines immediately following the title. The program will recognize the following as valid tags: "Categories: ", "Categories ", "Category ", "Serves: ", "Serves ", "Servings: ", "Servings ", "Yields: ", "Yield: ", "Yields " and "Yield ". If there are no category lines, it will be converted into MealMaster as "Categories: None". If there is no serving information, it will be converted as "Yields: 1". (3) Leave one line blank between the title (and servings and/or categories) and the ingredients. (4) Leave one line blank between the ingredients and the directions. (5) Place 5 closed brackets ("]]]]]") on the line following the last line of directions. e. To have this program convert an ingredient line to a MealMaster Header line, the line should be in all Capital letters and end with a colon (:). 1 tsp sugar FILLING: 1 cup apples will be converted in mealmaster to: 1 ts sugar H FILLING 1 c apples f. The ingredient lines in any recipe may have extra spaces in them, these will all be removed during the conversion process. g. The ingredients on "unformatted" or MasterCook recipes may start anywhere on the line, there is no need to remove leading spaces in unformatted recipes, or to have the MasterCook ingrients in their proper columns. h. Any ingredient line which has something like "package", etc, with the size of the package preceeding it, can be converted properly by placing the package size in parenthesis (): Original line: 1 10-ounce package spinach Edited line: 1 (10-ounce) package spinach Converted line: 1 pk (10-ounce) spinach --------------------------------------------------------------------- ADDITIONAL NOTES ADDED FOR beta v1.2 1. In unformatted recipes, the word "of" in an ingriedient such as "1 cup of water" will be removed. The program will only remove "of" when it occurs immediately after the unit of measure (cup, can, etc), so the "of" in "1 can cream of mushroom soup" will NOT be removed. 2. In unformatted and MasterCook recipes, if there are lines that you do not want reformatted (such as diagrams of how something should look), place a colon as the first character of each line you do not want reformatted. MealMaster will remove these colons when the recipe is imported. 3. Since MasterCook allows more characters per ingredient on one line, you can improve the appearance of the MM recipe by some minor edits. If any MC recipe ingredient covers more that one line, edit those lines to place them ALL on one line (you can leave the extra spaces). When converted, the line will be broken up into MM-sized lines. Example (the changes might not be so apparent if your editor word-wraps the lines, but it should still work. All I did was pull the third line up to be on the same line as the second line): Original recipe: --------------- 1/2 lb Margarine 1/2 lb Cream cheese -- (I use Philadelphia light or no-fat -- Cream cheese when I can) 2 Egg yolks -- (I use egg beater Edited recipe: ------------- 1/2 lb Margarine 1/2 lb Cream cheese -- (I use Philadelphia light or no-fat -- Cream cheese when I can) 2 Egg yolks -- (I use egg beater 4. The program will now accept filename input on the command line, so to convert a file called "MM332", simply run "mm_bustr mm332". 5. The program will now run until a blank filename is entered. 6. The program can be aborted with at any time. 7. Long MasterCook and unformatted recipes are split into multiple recipes with lengths of 100 lines, with each split recipe having the same title, plus "PT 1", "PT 2", etc. 8. Filenames with extensions can be used for input (don't use ".MMF" or ".OUT" for filenames or serious problems WILL occur!). --------------------------------------------------------------------------- FUTURE NOTES: The final version will use a configuration file where the abbreviations for digest files, and the accompanying posting string, is entered, so users can add filename-types for any recipe list digest (or for that matter, any type of text file) they desire. I have already written this, tested it, and it works fine. It just won't be added until the final version is released, to keep de-bugging a little easier. Also, the final version's config file will include a switch to determine whether the original digest will be deleted after conversion or not. This has not been implemented, again, for de-bugging purposes.