MealMaster Recipe Buster (MM_BUSTR) Version 1.6 (23 Feb 97) (c) 1996-97 Glen G. Hosey --------------------------------------------------- A program to convert recipes into MealMaster format. --------------------------------------------------- 1. WHAT THIS PROGRAM WILL DO 2. WHAT YOU NEED TO DO TO PREPARE YOUR E-MAIL FILE FOR CONVERSION 3. TO PREPARE UNFORMATTED RECIPES 4. RUNNING MM_BUSTR 5. FORMATTING NOTES (THINGS WHICH WILL BE CONVERTED, ETC.) 6. NOTES ON ERRORS WHEN IMPORTING THE CONVERTED MEALMASTER RECIPES 7. MM_BUSTER.CFG -- THE CONFIGURATION FILE 8. CONVERTING "@@@@@" recipes 9. CHANGES FOR VERSION 1.5/1.6 10. WHAT'S COMING...... --------------------------------------------------------------------------- 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 believe you will find this program to be of tremendous value if you are importing numerous recipes from the internet, or just typing in your favorite recipes to import into MealMaster. 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. Also, please feel free to contact me for any questions about this program, editing the configuration file, etc, etc..... 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 (or optionally deletes the original file if you don't want it anymore). 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. (Categories, Servings, etc.) 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. k. All "unit of measurement" which MealMaster recognizes will be converted to their appropriate MM format, otherwise, the unit of measurement will be included in the item name portion of the recipe. That is, MM recognizes "pk" to be an abbreviation for "package" and allows that as a unit of measurement. MM does not recognize any abbreviation for "envelope", therefore ingredient lines with "envelope" in it will have it as part of the item. Examples: "1 package dry yeast" will be converted to "1 pk dry yeast", whereas the line "1 envelope dry yeast" will become "1 envelope dry yeast". 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 abbreviations are all in the original configuration file that comes with this program. See "MM_BUSTER.CFG -- The configuration file" below to add your own favorites to this list. c. No matter what the settings in the original configuration file are, you can change them to suit your desires as to what gets placed into the recipe about the poster. For each of these examples, assume that all recipes are from the MealMaster Digest #018, which contains recipes posted on 16 Jan: (1) If you like to place the digest number in the recipe, save your file as "MM018" or "MM018.TXT" and use the following line in your configuration file: "MM,N,Posted to MM-Recipes Digest #". Your recipe will contain the line: "Posted to MM-Recipes Digest #018 by hosey on Thu, 16 Jan 1997." (The "N" denotes that a digest number will follow the "MM" in the filename.) (2) If you want to place the date of the digest into the recipe, save your file as "MM0116" or "MM0116.TXT" (for Jan 16) and change the configuration file to read "MM,D,Posted to MM-Recipes Digest ". The recipe will contain the line "Posted to MM-Recipes digest 16 Jan 1997 by hosey on Thu, 16 Jan 1997." (The "D" denotes that a 4-digit date will follow the "MM" in the filename.) (3) If you want just the list the recipe came from, the name of the poster and the date, change the line in the config file to read "MM,X,Posted to MM-Recipes". Your recipe will contain the line "Posted to MM-Recipes by hosey on Thu, 16 Jan 1997." (The "X" tells the program to just ignore anything after the "MM" in the filename.) (4) If you want only the poster's name/e-mail address and the date of the posting to appear in the recipe, there are two ways to do this: Either remove the line containing "MM" from the config file, or change the line to read "MM,X," (make sure there is a comma after the "X"!). The recipe will now contain just "By hosey on Thu, 16 Jan 1997." 3. To prepare unformatted recipes: a. Place 5 open brackets ("[[[[[") on the line preceeding the title. b. 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". NOTE: Multiple catagories MUST be separated by a comma. c. Leave one line blank between the title (and servings and/or categories) and the ingredients. d. Leave one line blank between the ingredients and the directions. e. Place 5 closed brackets ("]]]]]") on the line following the last line of directions. 4. Running MM_BUSTR a. MM_BUSTR is a DOS program, designed to be run under DOS from the command line. It can probably be run under Windows, but it's performance can be shaky depending on the type of system you have. b. Unzip the MM_BUSTR.ZIP file to the subdirectory where your email text files will reside. You will have three files, MM_BUSTR.EXE (the program), MM_BUSTR.CFG (the configuration file) and this file (MM_BUSTR.TXT). c. If using this program with Windows, start a "MS DOS Prompt" and go to the directory where the program resides. Execute MM_BUSTR from the command line by typing "MM_BUSTR" (without the quotes). You can optionally specify the file to be converted on the command line, i.e. "MM_BUSTR MM330". d. As each file is converted, you will be shown the number of recipes converted of each category. Then program will wait for a keypress then prompt you for the next file to be converted. NOTE: The program will ONLY show you files that have no extension if the second line in the .CFG file contains "ALLFILES=NO". It will show you "MM330" but not "MM330.TXT". To have the program show all files, change the second line in MM_BUSTR.CFG to read "ALLFILES=YES". You can still enter "MM330.TXT" as the file to be converted. Two recipe will be created, one containing original MasterCook recipes (MM330.MXP) and one containing the converted MealMaster recipes (MM330.MMF). e. The program will continue to show you a list of files to be converted until a blank filename is entered or you hit to end the program. f. The program can be aborted with at any time. g. Filenames with extensions can be used for input (don't use ".MMF" or ".OUT" for your original filename or serious problems WILL occur!). 5. FORMATTING NOTES (Things which will be converted, etc.): a. 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 b. The ingredient lines in any recipe may have extra spaces in them, these will all be removed during the conversion process. c. 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. d. 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 e. 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. f. 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. g. 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 h. 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 2", "PT 3", etc. j. The wierd characters are now properly converted when they are found under the "NOTES " section of MC recipes. This was an oversight. k. Blank and zero serving sizes in MC recipes are now converted to "Yield: 1". l. When working with files containing nothing but a long list of unformatted recipes, the ending "]]]]]" between each recipe can be skipped. The program senses the start of the next recipe when it sees the "[[[[[" start, terminates the old recipe and starts a new one. This should be used ONLY when the file contains nothing but recipes, as any text between the two recipes would also get included! Please, however, include the "[[[[[" after the last recipe in the file to terminate the program. m. Long unformatted recipes are split into multiple recipes with lengths of 100 lines, with each split recipe having the same title, plus "PT 2", "PT 3", etc. n. Lines which contain an "x to y" amount, such as "1-2 cups" or "1 - 1 1/2 tsp" MUST be edited to conform to the following rule: Remove the dash between the two amounts and insert the word "to". In the examples above, the amounts should be re-written as "1 to 2 cups" and "1 to 1-1/2 tsp" for the program to operate properly. 6. NOTES ON ERRORS WHEN IMPORTING THE CONVERTED MEALMASTER RECIPES: 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...... 7. MM_BUSTER.CFG -- The configuration file: a. This file MUST be present in order for MM_BUSTR to run! If it is not present, the program will create a new file for you with the default abbreviations shown above, and inform you of this. You can then run the program again successfully. b. You can edit this file to include abbreviations and posting strings for any of your favorite internet digests (or any text file for that matter). c. The first line of the configuration file MUST contain instructions on whether to delete the original file or not! The format is "DELETE=NO" to retain the original file, and rename it with a ".DON" extension (i.e. MM330 will be renamed MM330.DON after it is converted). To delete the original file after conversion, change this line to read "DELETE=YES". (Actually, anything other than "DELETE=YES" will retain the original file). d. The second line MUST contain instructions on whether to show all files for conversion, or just show files which have no extensions. "ALLFILES=YES" will show all files, "ALLFILES=NO" (or anything else!) will show only files which have no extension. e. The remaining lines must each contain 3 entries for each filename abbreviation you want to include: (1) The abbreviation (like MM, MC, etc) which will be the first characters of the file to be converted. This may be anywhere from 2 to 4 characters in length, and MUST be capitalized. (2) A 1-character designator to tell the program whether the numbers following the abbreviation in the filename contain a 3-digit digest number (N), a 4-digit date in the format of "mmdd" (D) or have no meaning (X). (3) The character string which gets attached to each recipe in the file, telling where the recipe originally came from ("Posted to MM-Recipes Digest", etc.) f. Blank lines at the end of the file get ignored. g. EXAMPLES: For a line to convert a file "MM330" which contains recipes from "MM-Recipes Digest #330", use the following line: MM,N,Posted to MM-Recipes Digest # The "N" above tells the program that files beginning with "MM" will contain a 3-digit digest number. The posting string for file "MM330" will be changed to add the digest number, as in "Posted to MM-Recipes Digest #330". For a line to convert a file "FW1214" which contains recipes from the FOODWINE Digest - 14 December 1996, use the following line: FW,D,Posted to FOODWINE Digest - The "D" above tells the program that files beginning with "FW" will contain a 4-digit date in the format "mmdd", so that file "FW1214" will have the posting string changed to "Posted to FOODWINE Digest - 12 Dec 96". NOTE that there is a space after the dash in the example line above. For a line to convert file "RECIPES" which contains, as an example, recipes which you have typed in from the local newspaper, use line: RECIPES,X,Recipes from the local newspaper. In the example above, the "X" tells the program that there are no numbers following the "RECIPES" in the filename, or if there are, to ignore them and use only the posting string in the configuration file. No extra numbers for a digest or date will be added to the posting string. 8. Converting "@@@@@" recipes: a. The "@@@@@" format is used to post recipes which can be directly imported by MasterCook; they will be converted to MealMaster format. b. The "legal" format for these recipes is the ""@@@@@", the title of the recipe, one completely blank line, one line containing "notes" and one more blank line before the ingredients. The line containing the "notes" will be captured and placed at the end of the converted recipe. c. Since this format of recipes has absolutely NO "end of recipe" characters, these recipes when converting, will continue to include the digest text until the program finds something it recognizes to terminate the recipe. This includes the line of dashes separating individual messages in the digest, or the start of another valid recipe. d. To get around this, I allowed the same "]]]]]" to be used as a recipe terminating string. To terminate these recipes cleanly, edit the digest and place the "]]]]]" where you want the recipe to end. 9. CHANGES FOR VERSION 1.5/1.6: I have made a few subtle changes, and one major one to the new version. This is a short summary of those changes: a. There is a new switch in the configuration file. Then second line now contains a line which tells the program to display ALL files or just files which have no extension. The original idea was to have all digests saved without any extension. When converted, the original file would be renamed to have an extension. So when the program displayed the files to convert, all those already converted would not be shown! Made it easier to figure which files needed converting or not. If you want the program to show all files, edit the MM_BUSTR.CFG file to have the second line read "ALLFILES=YES". Leaving it as "ALLFILES=NO" will just show files without extensions. b. Direction lines were originally parsed, and the extra multiple spaces removed. This cleaned up many recipes which had the direction lines totally messed up. Unfortunately, it also deleted the spaces at the beginning of the lines, causing directions to be all wrapped together when imported. This has been changed, so that any direction line with 2 spaces (or more) at the start of the line will have 2 spaces in the converted file. c. The routine to convert the { Exported from MasterCook Mac } recipes has been totally rewritten, so that (hopefully) the "method" will now be separated from the "ingredient" with a comma. This works with both the version in which the items are separated with tabs and the version in which the items are separated with extra spaces. d. The "Nutr. Assoc." which gets placed at the end of some MasterCook Mac recipes will be removed from the resulting recipes. e. After converting a file, you now have the option to hit to terminate the program at that point, without going back through the list of files before you can end the program. f. Some spacing changes have been made to clean up more stuff in v1.6 and "tins" now get translated to "cans" -- If you Ozzies out there, etc, want me to, I'll do up another version so that all "cans" get changed to "tins" , just let me know! (But "tins" won't import into MealMaster!) 10. What's coming...... a. The other thing I plan is to release a Windows version as soon as I purchase a Borland C++ for Windows compiler....... just don't expect this one toooooo soon