MealMaster Recipe Buster (MM_BUSTR) Version 1.7 (23 Feb 97) (c) 1996-97 Glen G. Hosey --------------------------------------------------- A program to convert recipes into MealMaster format. --------------------------------------------------- ***** THE PROBLEMS WITH THE TNT RECIPES LIST IS FIXED! 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. CHANGES FOR VERSION 1.7 11. CHANGES FOR VERSION 1.8 12. CHANGES FOR VERSION 1.9 --------------------------------------------------------------------------- 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. THIS MUST BE ON A SEPARATE LINE. 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. IF YOU DON'T LEAVE A BLANK LINE, DISASTER RESULTS! The program gets real confused when it doesn't find blank lines. 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. Again, this MUST be on a separate line, with nothing else on it, and you MUST put a after it! 4. Running MM_BUSTR a. MM_BUSTR is a DOS program, designed to be run under DOS from the command line or from an "MS-DOS prompt" in Windows. It can be run under Windows, just create an icon for it, using the "File", "New", "Program Item", and specify the proper information about the program, etc. Consult your Windows manual for the details. b. Create a separate subdirectoy where you want this program to reside and where you will save all your recipe files to. (Like "C:\BUSTER" or "C:\RECIPES", etc.) 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). If you got the self-extracting version (BUSTER17.EXE) you don't need to un-zip it, but you must copy the file to the subdirectory, and then run BUSTER17 which will create the actual MM_BUSTR program files for you. 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 title of each recipe converted along with the recipe type it originally was (MasterCook, MealMaster, Unformatted). The program will show 20 recipe titles, then pause for a keypress before converting more. After the conversion process is completed, 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. CHANGES FOR VERSION 1.7 a. Some folks have wanted a way to put a whole bunch of information into a group of recipes, something that can't be done with the one-line poster information string. I have created a new tag called "Footer: " which can be placed anywhere OUTSIDE a valid recipe. Anything on the footer line, which can be up to 1024 characters long, will be placed at the end of each recipe. (1) If you want to enter the footer as multiple lines, you may do so, if you place two plus signs (++) at the end of each line EXCEPT the last line. The lines will all be pulled together as one line. The 1024 character limit still applies for the total of all the footer lines. (2) If at some point, you don't want the footer to appear in the next recipes, you can place a blank footer ("Footer: ") and the footer will be ignored. (3) Each occurance of a line beginning with "Footer: " will replace any previous footer you enter. b. I had a BIG problem with the TNT digests. One of the things this program keyed on was the "standard" message separation line used by most of the digest software! Unfortunately, Prodigy does their own thing, and a whole bunch of garbage was getting put into the recipes! Alas, I have fixed that one. And I sincerely apologize for any messed up recipes I might have been the cause of. c. If you want to put any notes in the configuration file (MM_BUSTR.CFG), you may do so, just place a pound sign (#) as the first character in the line and that line will be ignored as a configuration line. I have put these notes into the .CFG file that comes with this program, showing how each line will output the posting string. I hope these examples will help clear up some of the confusion as to what a configuration line will produce. d. There is another new switch in the configuration file. The third line now will control whether the program scrolls only 20 recipe titles at a time, or does not pause. PAUSE=YES will scroll 20 at a time, PAUSE=NO will go through converting all recipes without stopping. e. The other new switch determines the appearance of titles in the converted recipes. CAPTITLES=YES will convert all titles to all capital letters (THIS IS A RECIPE TITLE); CAPTITLES=NO will convert all titles to a "normal" format (This Is A Recipe Title). f. The updated Version 1.7f now converts those wierd lines in MC recipes which originally came from MM header lines. When they got converted into MC, it split the lines into 2 separate lines, sometimes with wierd characters in them. This version will put those lines back together into the proper original MM header line. 11. CHANGES FOR VERSION 1.8 a. Support was added to recognize the newer format from Gary Hauser's "Now You're Cooking!" software, version 4.20. This exports using a slightly different header that was not previously recognized as a valid recipe. 12. CHANGES FOR VERSION 1.9 a. In response to a lot of people who wanted a capability to process more than one file at a time, I have added a switch "/LIST" to the program. If you run buster with the command "MM_BUSTR /LIST", the program will create a listing of all files in your subdirectory (BUSTFILE.FIL), and will then go through the filenames one at a time, and ask if you want to bust that file or not. If you answer "Y" or "y", that file will be busted. An answer of "N" or "n" will skip to the next file. Hitting an "X", "x" or CONTROL-X will abort the program. This new switch will NOT prompt you for any files which have extensions: .EXE .CFG .MMF .MXP .DON .OUT .ZIP .BAK b. Version 1.9a now properly formats the ingredients, as MM designed them. The first comma in an ingredient line is changed to a semi-colon so that the shopping list prints correctly. The semi-colon tells the shopping list to terminate the ingredient name there.