home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Colossal Cookbook
/
ColossalCookbook.cdr
/
misc
/
recfeb91.zip
/
FOOD11.BAS
< prev
next >
Wrap
BASIC Source File
|
1991-03-03
|
10KB
|
258 lines
10 REM PROGRAM NAME IS FOOD11.BAS Written by John P. Nicholson of 1:308/10
20 REM This basic program has no warranties an is guaranteed to do nothing
30 REM more than take up disk space on your system. The code is placed in
40 REM the public domain and you can do with it as you see fit. Please
50 REM keep the documentation with this program if you plan to share it with
60 REM others. The intended purpose of this program is to extract cooking
70 REM recipes from captured COOKING or COFFEE_KLATSCH echomail messages.
80 REM Version 1.1 - Dated 03 March 1991 (Please read the documentation)
90 REM --------------------------------------------------------------------
100 DIM Q$(200)
110 DIM C$(200)
120 DIM M$(200)
130 DIM R$(200)
140 DIM V$(200)
150 DIM O$(200)
160 O=0
170 V=0
180 Q=0
190 C=0
200 M=0
210 R=0
220 L=0
230 REM "Give A Directory Listing of File Names"
240 FILES
250 INPUT"What is the name of the Input File? =*---> ";FIN$
260 REM "This is where we open 7 files for I/O"
270 OPEN FIN$ FOR INPUT AS 1
280 OPEN "QUIKBOOK" FOR OUTPUT AS 2 LEN=79
290 OPEN "COMPCHEF" FOR OUTPUT AS 3 LEN=79
300 OPEN "MEALMAST" FOR OUTPUT AS 4 LEN=79
310 OPEN "MRS-MAST" FOR OUTPUT AS 5 LEN=79
320 OPEN "VITTLES" FOR OUTPUT AS 6 LEN=79
330 OPEN "OTHER" FOR OUTPUT AS 7 LEN=79
340 LINE INPUT#1, AA$
350 L=L+1
360 IF EOF(1) THEN 1520
370 REM "This line checks for a QuikBook recipe."
380 IF LEFT$(AA$,6) = "-Begin" THEN GOTO 510
390 REM "This line checks for a CompuChef Recipe."
400 IF LEFT$(AA$,14) = " **********" THEN GOTO 680
410 REM "This line checks for a MealMaster Recipe"
420 IF MID$(AA$,15,10) = "Recipe Ext" THEN GOTO 850
430 REM "This line checks for a Master Recipe System recipe."
440 IF LEFT$(AA$,12) = "MRS: MASTER " THEN GOTO 1020
450 REM "This line checks for a Vittles recipe."
460 IF LEFT$(AA$,14) = "=====< RECIPE " THEN GOTO 1190
470 REM "This line checks for other recipes. (Read the Documentation)"
480 IF LEFT$(AA$,8) = "---Start" THEN GOTO 1360
490 GOTO 340
500 REM "Start saving QuikBook recipe in Q$ array."
510 Q=Q+1
520 IF Q=201 THEN GOSUB 1550 ELSE GOTO 550
530 PRINT " Re-Run the program after you have made the corrections."
540 END
550 Q$(Q)=AA$
560 LINE INPUT#1, AA$
570 L=L+1
580 IF EOF(1) THEN 1520
590 IF LEFT$(AA$,4) <> "-End" THEN GOTO 510
600 Q$(Q)=AA$
610 FOR A=1 TO Q
620 PRINT#2, Q$(A)
630 NEXT A
640 Q = 0
650 PRINT L
660 GOTO 340
670 REM "Start saving CompuChef recipe in C$ array."
680 C=C+1
690 IF C=201 THEN GOSUB 1700 ELSE GOTO 720
700 PRINT " Re-Run the program after you have made the corrections."
710 END
720 C$(C)=AA$
730 LINE INPUT#1, AA$
740 L=L+1
750 IF EOF(1) THEN 1520
760 IF LEFT$(AA$,15) <> " *** Recipe " THEN GOTO 680
770 C$(C)=AA$
780 FOR B=1 TO C
790 PRINT#3, C$(B)
800 NEXT B
810 C = 0
820 PRINT L
830 GOTO 340
840 REM "Start saving MealMaster recipe in M$ array."
850 M=M+1
860 IF M=201 THEN GOSUB 1850 ELSE GOTO 890
870 PRINT " Re-Run the program after you have made the corrections."
880 END
890 M$(M)=AA$
900 LINE INPUT#1, AA$
910 L=L+1
920 IF EOF(1) THEN 1520
930 IF LEFT$(AA$,10) <> "+++-------" THEN GOTO 850
940 M$(M)=AA$
950 FOR D=1 TO M
960 PRINT#4, M$(D)
970 NEXT D
980 M = 0
990 PRINT L
1000 GOTO 340
1010 REM "Start saving Master Recipe System recipes in R$ array."
1020 R=R+1
1030 IF R=201 THEN GOSUB 2050 ELSE GOTO 1060
1040 PRINT " Re-Run the program after you have made the corrections."
1050 END
1060 R$(R)=AA$
1070 LINE INPUT#1, AA$
1080 L=L+1
1090 IF EOF(1) THEN 1520
1100 IF LEFT$(AA$,4) <> "--- " THEN GOTO 1020
1110 R$(R)=AA$
1120 FOR E=1 TO R
1130 PRINT#5, R$(E)
1140 NEXT E
1150 R=0
1160 PRINT L
1170 GOTO 340
1180 REM "Start saving VITTLES system recipes in V$ array."
1190 V=V+1
1200 IF V=201 THEN GOSUB 2240 ELSE GOTO 1230
1210 PRINT " Re-Run the program after you have made the corrections."
1220 END
1230 V$(V)=AA$
1240 LINE INPUT#1, AA$
1250 L=L+1
1260 IF EOF(1) THEN 1520
1270 IF LEFT$(AA$,4) <> "--- " THEN GOTO 1190
1280 V$(V)=AA$
1290 FOR F=1 TO V
1300 PRINT#6, V$(F)
1310 NEXT F
1320 V=0
1330 PRINT L
1340 GOTO 340
1350 REM " Start saving OTHER recipes in o$ array."
1360 O=O+1
1370 IF O=201 THEN GOSUB 2430 ELSE GOTO 1400
1380 PRINT " Re-Run the program after you have made the corrections."
1390 END
1400 O$(O)=AA$
1410 LINE INPUT#1, AA$
1420 L=L+1
1430 IF EOF(1) THEN 1520
1440 IF LEFT$(AA$,6) <> "---End" THEN GOTO 1360
1450 O$(O)=AA$
1460 FOR G=1 TO O
1470 PRINT#7, O$(G)
1480 NEXT G
1490 O=0
1500 PRINT L
1510 GOTO 340
1520 PRINT "E.O.F. at Line ";L
1530 CLOSE
1540 END
1550 REM "Start of QuikBook Error Subroutine"
1560 PRINT " We seem to have encountered a problem with a QuikBook Recipe."
1570 PRINT " -------------------------------------------------------------"
1580 PRINT " "
1590 PRINT " There are two possibilites for this error:"
1600 PRINT " "
1610 PRINT " 1) The recipe is longer than 200 lines, or"
1620 PRINT " "
1630 PRINT " 2) The program failed to locate the correct"
1640 PRINT " termination code, which is '-End'."
1650 PRINT " "
1660 PRINT " This recipe starts on line";L-200;" in your"
1670 PRINT " INPUT text file. Use your text editor to fix"
1680 PRINT " the problem. Type SYSTEM to exit BASIC."
1690 RETURN
1700 REM "Start of CompuChef Error Subroutine"
1710 PRINT " We seem to have encountered a problem with a CompChef Recipe."
1720 PRINT " -------------------------------------------------------------"
1730 PRINT " "
1740 PRINT " There are two possibilites for this error:"
1750 PRINT " "
1760 PRINT " 1) The recipe is longer than 200 lines, or"
1770 PRINT " "
1780 PRINT " 2) The program failed to locate the correct"
1790 PRINT " termination code, which is ' *** Recipe '
1800 PRINT " "
1810 PRINT " This recipe starts on line";L-200;" in your"
1820 PRINT " INPUT text file. Use your text editor to fix"
1830 PRINT " the problem. Type SYSTEM to exit BASIC."
1840 RETURN
1850 REM "Start of MealMaster Error Subroutine"
1860 PRINT " We seem to have encountered a problem with a MealMaster Recipe."
1870 PRINT " ---------------------------------------------------------------"
1880 PRINT " "
1890 PRINT " There are two possibilites for this error:"
1900 PRINT " "
1910 PRINT " 1) The recipe is longer than 200 lines, or"
1920 PRINT " "
1930 PRINT " 2) The program failed to locate the correct"
1940 PRINT " termination code, which is '+++-------'
1950 PRINT " "
1960 PRINT " Please read the .DOC file for the strict format"
1970 PRINT " requirements for Meal Master Recipes. Additional"
1980 PRINT " editing will be required before being able to import"
1990 PRINT " these recipes into the MealMaster program.
2000 PRINT " "
2010 PRINT " This recipe starts on line";L-200;" in your"
2020 PRINT " INPUT text file. Use your text editor to fix"
2030 PRINT " the problem. Type SYSTEM to exit BASIC."
2040 RETURN
2050 REM "Start of Master Recipe System Error Subroutine"
2060 PRINT " We seem to have encountered a problem with an MRS: Recipe."
2070 PRINT " ----------------------------------------------------------"
2080 PRINT " "
2090 PRINT " There are two possibilites for this error:"
2100 PRINT " "
2110 PRINT " 1) The recipe is longer than 200 lines, or"
2120 PRINT " "
2130 PRINT " 2) The program failed to locate the correct"
2140 PRINT " termination code, which is '--- '
2150 PRINT " "
2160 PRINT " NOTE: Some EchoMail systems have Tear lines that"
2170 PRINT " DO NOT have a space after the third '-', you"
2180 PRINT " might have to enter a space to eliminate the error."
2190 PRINT " "
2200 PRINT " This recipe starts on line";L-200;" in your"
2210 PRINT " INPUT text file. Use your text editor to fix"
2220 PRINT " the problem. Type SYSTEM to exit BASIC."
2230 RETURN
2240 REM "Start of VITTLES Recipe System Error Subroutine"
2250 PRINT " We seem to have encountered a problem with a Vittles Recipe."
2260 PRINT " ------------------------------------------------------------"
2270 PRINT " "
2280 PRINT " There are two possibilites for this error:"
2290 PRINT " "
2300 PRINT " 1) The recipe is longer than 200 lines, or"
2310 PRINT " "
2320 PRINT " 2) The program failed to locate the correct"
2330 PRINT " termination code, which is '--- '
2340 PRINT " "
2350 PRINT " NOTE: Some EchoMail systems have Tear lines that"
2360 PRINT " DO NOT have a space after the third '-', you"
2370 PRINT " might have to enter a space to eliminate the error."
2380 PRINT " "
2390 PRINT " This recipe starts on line";L-200;" in your"
2400 PRINT " INPUT text file. Use your text editor to fix"
2410 PRINT " the problem. Type SYSTEM to exit BASIC."
2420 RETURN
2430 REM "Start of OTHER Error Subroutine"
2440 PRINT " We seem to have encountered a problem with an OTHER Recipe."
2450 PRINT " -------------------------------------------------------------"
2460 PRINT " "
2470 PRINT " There are two possibilites for this error:"
2480 PRINT " "
2490 PRINT " 1) The recipe is longer than 200 lines, or"
2500 PRINT " "
2510 PRINT " 2) The program failed to locate the correct"
2520 PRINT " termination code, which is '---End'."
2530 PRINT " "
2540 PRINT " This recipe starts on line";L-200;" in your"
2550 PRINT " INPUT text file. Use your text editor to fix"
2560 PRINT " the problem. Type SYSTEM to exit BASIC."
2570 RETURN