home *** CD-ROM | disk | FTP | other *** search
/ Colossal Cookbook / ColossalCookbook.cdr / misc / recfeb91.zip / FOOD11.BAS < prev    next >
BASIC Source File  |  1991-03-03  |  10KB  |  258 lines

  1. 10 REM PROGRAM NAME IS FOOD11.BAS  Written by John P. Nicholson of 1:308/10
  2. 20 REM This basic program has no warranties an is guaranteed to do nothing
  3. 30 REM more than take up disk space on your system.  The code is placed in
  4. 40 REM the public domain and you can do with it as you see fit.  Please
  5. 50 REM keep the documentation with this program if you plan to share it with
  6. 60 REM others.  The intended purpose of this program is to extract cooking
  7. 70 REM recipes from captured COOKING or COFFEE_KLATSCH echomail messages.
  8. 80 REM Version 1.1 - Dated 03 March 1991 (Please read the documentation)
  9. 90 REM --------------------------------------------------------------------
  10. 100 DIM Q$(200)
  11. 110 DIM C$(200)
  12. 120 DIM M$(200)
  13. 130 DIM R$(200)
  14. 140 DIM V$(200)
  15. 150 DIM O$(200)
  16. 160 O=0
  17. 170 V=0
  18. 180 Q=0
  19. 190 C=0
  20. 200 M=0
  21. 210 R=0
  22. 220 L=0
  23. 230 REM "Give A Directory Listing of File Names"
  24. 240 FILES
  25. 250 INPUT"What is the name of the Input File? =*---> ";FIN$
  26. 260 REM "This is where we open 7 files for I/O"
  27. 270 OPEN FIN$ FOR INPUT AS 1
  28. 280 OPEN "QUIKBOOK" FOR OUTPUT AS 2 LEN=79
  29. 290 OPEN "COMPCHEF" FOR OUTPUT AS 3 LEN=79
  30. 300 OPEN "MEALMAST" FOR OUTPUT AS 4 LEN=79
  31. 310 OPEN "MRS-MAST" FOR OUTPUT AS 5 LEN=79
  32. 320 OPEN "VITTLES" FOR OUTPUT AS 6 LEN=79
  33. 330 OPEN "OTHER" FOR OUTPUT AS 7 LEN=79
  34. 340 LINE INPUT#1, AA$
  35. 350 L=L+1
  36. 360 IF EOF(1) THEN 1520
  37. 370 REM "This line checks for a QuikBook recipe."
  38. 380 IF LEFT$(AA$,6) = "-Begin" THEN GOTO 510
  39. 390 REM "This line checks for a CompuChef Recipe."
  40. 400 IF LEFT$(AA$,14) = "    **********" THEN GOTO 680
  41. 410 REM "This line checks for a MealMaster Recipe"
  42. 420 IF MID$(AA$,15,10) = "Recipe Ext" THEN GOTO 850
  43. 430 REM "This line checks for a Master Recipe System recipe."
  44. 440 IF LEFT$(AA$,12) = "MRS: MASTER " THEN GOTO 1020
  45. 450 REM "This line checks for a Vittles recipe."
  46. 460 IF LEFT$(AA$,14) = "=====< RECIPE " THEN GOTO 1190
  47. 470 REM "This line checks for other recipes. (Read the Documentation)"
  48. 480 IF LEFT$(AA$,8) = "---Start" THEN GOTO 1360
  49. 490 GOTO 340
  50. 500 REM "Start saving QuikBook recipe in Q$ array."
  51. 510 Q=Q+1
  52. 520 IF Q=201 THEN GOSUB 1550 ELSE GOTO 550
  53. 530 PRINT "     Re-Run the program after you have made the corrections."
  54. 540 END
  55. 550 Q$(Q)=AA$
  56. 560 LINE INPUT#1, AA$
  57. 570 L=L+1
  58. 580 IF EOF(1) THEN 1520
  59. 590 IF LEFT$(AA$,4) <> "-End" THEN GOTO 510
  60. 600 Q$(Q)=AA$
  61. 610 FOR A=1 TO Q
  62. 620     PRINT#2, Q$(A)
  63. 630 NEXT A
  64. 640 Q = 0
  65. 650 PRINT L
  66. 660 GOTO 340
  67. 670 REM "Start saving CompuChef recipe in C$ array."
  68. 680 C=C+1
  69. 690 IF C=201 THEN GOSUB 1700 ELSE GOTO 720
  70. 700 PRINT "     Re-Run the program after you have made the corrections."
  71. 710 END
  72. 720 C$(C)=AA$
  73. 730 LINE INPUT#1, AA$
  74. 740 L=L+1
  75. 750 IF EOF(1) THEN 1520
  76. 760 IF LEFT$(AA$,15) <> "    *** Recipe " THEN GOTO 680
  77. 770 C$(C)=AA$
  78. 780 FOR B=1 TO C
  79. 790     PRINT#3, C$(B)
  80. 800 NEXT B
  81. 810 C = 0
  82. 820 PRINT L
  83. 830 GOTO 340
  84. 840 REM "Start saving MealMaster recipe in M$ array."
  85. 850 M=M+1
  86. 860 IF M=201 THEN GOSUB 1850 ELSE GOTO 890
  87. 870 PRINT "     Re-Run the program after you have made the corrections."
  88. 880 END
  89. 890 M$(M)=AA$
  90. 900 LINE INPUT#1, AA$
  91. 910 L=L+1
  92. 920 IF EOF(1) THEN 1520
  93. 930 IF LEFT$(AA$,10) <> "+++-------" THEN GOTO 850
  94. 940 M$(M)=AA$
  95. 950 FOR D=1 TO M
  96. 960     PRINT#4, M$(D)
  97. 970 NEXT D
  98. 980 M = 0
  99. 990 PRINT L
  100. 1000 GOTO 340
  101. 1010 REM "Start saving Master Recipe System recipes in R$ array."
  102. 1020 R=R+1
  103. 1030 IF R=201 THEN GOSUB 2050 ELSE GOTO 1060
  104. 1040 PRINT "     Re-Run the program after you have made the corrections."
  105. 1050 END
  106. 1060 R$(R)=AA$
  107. 1070 LINE INPUT#1, AA$
  108. 1080 L=L+1
  109. 1090 IF EOF(1) THEN 1520
  110. 1100 IF LEFT$(AA$,4) <> "--- " THEN GOTO 1020
  111. 1110 R$(R)=AA$
  112. 1120 FOR E=1 TO R
  113. 1130     PRINT#5, R$(E)
  114. 1140 NEXT E
  115. 1150 R=0
  116. 1160 PRINT L
  117. 1170 GOTO 340
  118. 1180 REM "Start saving VITTLES system recipes in V$ array."
  119. 1190 V=V+1
  120. 1200 IF V=201 THEN GOSUB 2240 ELSE GOTO 1230
  121. 1210 PRINT "     Re-Run the program after you have made the corrections."
  122. 1220 END
  123. 1230 V$(V)=AA$
  124. 1240 LINE INPUT#1, AA$
  125. 1250 L=L+1
  126. 1260 IF EOF(1) THEN 1520
  127. 1270 IF LEFT$(AA$,4) <> "--- " THEN GOTO 1190
  128. 1280 V$(V)=AA$
  129. 1290 FOR F=1 TO V
  130. 1300     PRINT#6, V$(F)
  131. 1310 NEXT F
  132. 1320 V=0
  133. 1330 PRINT L
  134. 1340 GOTO 340
  135. 1350 REM " Start saving OTHER recipes in o$ array."
  136. 1360 O=O+1
  137. 1370 IF O=201 THEN GOSUB 2430 ELSE GOTO 1400
  138. 1380 PRINT "     Re-Run the program after you have made the corrections."
  139. 1390 END
  140. 1400 O$(O)=AA$
  141. 1410 LINE INPUT#1, AA$
  142. 1420 L=L+1
  143. 1430 IF EOF(1) THEN 1520
  144. 1440 IF LEFT$(AA$,6) <> "---End" THEN GOTO 1360
  145. 1450 O$(O)=AA$
  146. 1460 FOR G=1 TO O
  147. 1470     PRINT#7, O$(G)
  148. 1480 NEXT G
  149. 1490 O=0
  150. 1500 PRINT L
  151. 1510 GOTO 340
  152. 1520 PRINT "E.O.F. at Line ";L
  153. 1530 CLOSE
  154. 1540 END
  155. 1550 REM "Start of QuikBook Error Subroutine"
  156. 1560 PRINT "    We seem to have encountered a problem with a QuikBook Recipe."
  157. 1570 PRINT "    -------------------------------------------------------------"
  158. 1580 PRINT " "
  159. 1590 PRINT "    There are two possibilites for this error:"
  160. 1600 PRINT " "
  161. 1610 PRINT "    1)  The recipe is longer than 200 lines, or"
  162. 1620 PRINT " "
  163. 1630 PRINT "    2)  The program failed to locate the correct"
  164. 1640 PRINT "        termination code, which is '-End'."
  165. 1650 PRINT " "
  166. 1660 PRINT "    This recipe starts on line";L-200;" in your"
  167. 1670 PRINT "    INPUT text file.  Use your text editor to fix"
  168. 1680 PRINT "    the problem.  Type SYSTEM to exit BASIC."
  169. 1690 RETURN
  170. 1700 REM "Start of CompuChef Error Subroutine"
  171. 1710 PRINT "    We seem to have encountered a problem with a CompChef Recipe."
  172. 1720 PRINT "    -------------------------------------------------------------"
  173. 1730 PRINT " "
  174. 1740 PRINT "    There are two possibilites for this error:"
  175. 1750 PRINT " "
  176. 1760 PRINT "    1)  The recipe is longer than 200 lines, or"
  177. 1770 PRINT " "
  178. 1780 PRINT "    2)  The program failed to locate the correct"
  179. 1790 PRINT "        termination code, which is '    *** Recipe '
  180. 1800 PRINT " "
  181. 1810 PRINT "    This recipe starts on line";L-200;" in your"
  182. 1820 PRINT "    INPUT text file.  Use your text editor to fix"
  183. 1830 PRINT "    the problem.  Type SYSTEM to exit BASIC."
  184. 1840 RETURN
  185. 1850 REM "Start of MealMaster Error Subroutine"
  186. 1860 PRINT "    We seem to have encountered a problem with a MealMaster Recipe."
  187. 1870 PRINT "    ---------------------------------------------------------------"
  188. 1880 PRINT " "
  189. 1890 PRINT "    There are two possibilites for this error:"
  190. 1900 PRINT " "
  191. 1910 PRINT "    1)  The recipe is longer than 200 lines, or"
  192. 1920 PRINT " "
  193. 1930 PRINT "    2)  The program failed to locate the correct"
  194. 1940 PRINT "        termination code, which is '+++-------'
  195. 1950 PRINT " "
  196. 1960 PRINT "    Please read the .DOC file for the strict format"
  197. 1970 PRINT "    requirements for Meal Master Recipes.  Additional"
  198. 1980 PRINT "    editing will be required before being able to import"
  199. 1990 PRINT "    these recipes into the MealMaster program.
  200. 2000 PRINT " "
  201. 2010 PRINT "    This recipe starts on line";L-200;" in your"
  202. 2020 PRINT "    INPUT text file.  Use your text editor to fix"
  203. 2030 PRINT "    the problem.  Type SYSTEM to exit BASIC."
  204. 2040 RETURN
  205. 2050 REM "Start of Master Recipe System Error Subroutine"
  206. 2060 PRINT "    We seem to have encountered a problem with an MRS: Recipe."
  207. 2070 PRINT "    ----------------------------------------------------------"
  208. 2080 PRINT " "
  209. 2090 PRINT "    There are two possibilites for this error:"
  210. 2100 PRINT " "
  211. 2110 PRINT "    1)  The recipe is longer than 200 lines, or"
  212. 2120 PRINT " "
  213. 2130 PRINT "    2)  The program failed to locate the correct"
  214. 2140 PRINT "        termination code, which is '--- '
  215. 2150 PRINT " "
  216. 2160 PRINT "    NOTE: Some EchoMail systems have Tear lines that"
  217. 2170 PRINT "          DO NOT have a space after the third '-', you"
  218. 2180 PRINT "          might have to enter a space to eliminate the error."
  219. 2190 PRINT " "
  220. 2200 PRINT "    This recipe starts on line";L-200;" in your"
  221. 2210 PRINT "    INPUT text file.  Use your text editor to fix"
  222. 2220 PRINT "    the problem.  Type SYSTEM to exit BASIC."
  223. 2230 RETURN
  224. 2240 REM "Start of VITTLES Recipe System Error Subroutine"
  225. 2250 PRINT "    We seem to have encountered a problem with a Vittles Recipe."
  226. 2260 PRINT "    ------------------------------------------------------------"
  227. 2270 PRINT " "
  228. 2280 PRINT "    There are two possibilites for this error:"
  229. 2290 PRINT " "
  230. 2300 PRINT "    1)  The recipe is longer than 200 lines, or"
  231. 2310 PRINT " "
  232. 2320 PRINT "    2)  The program failed to locate the correct"
  233. 2330 PRINT "        termination code, which is '--- '
  234. 2340 PRINT " "
  235. 2350 PRINT "    NOTE: Some EchoMail systems have Tear lines that"
  236. 2360 PRINT "          DO NOT have a space after the third '-', you"
  237. 2370 PRINT "          might have to enter a space to eliminate the error."
  238. 2380 PRINT " "
  239. 2390 PRINT "    This recipe starts on line";L-200;" in your"
  240. 2400 PRINT "    INPUT text file.  Use your text editor to fix"
  241. 2410 PRINT "    the problem.  Type SYSTEM to exit BASIC."
  242. 2420 RETURN
  243. 2430 REM "Start of OTHER Error Subroutine"
  244. 2440 PRINT "    We seem to have encountered a problem with an OTHER Recipe."
  245. 2450 PRINT "    -------------------------------------------------------------"
  246. 2460 PRINT " "
  247. 2470 PRINT "    There are two possibilites for this error:"
  248. 2480 PRINT " "
  249. 2490 PRINT "    1)  The recipe is longer than 200 lines, or"
  250. 2500 PRINT " "
  251. 2510 PRINT "    2)  The program failed to locate the correct"
  252. 2520 PRINT "        termination code, which is '---End'."
  253. 2530 PRINT " "
  254. 2540 PRINT "    This recipe starts on line";L-200;" in your"
  255. 2550 PRINT "    INPUT text file.  Use your text editor to fix"
  256. 2560 PRINT "    the problem.  Type SYSTEM to exit BASIC."
  257. 2570 RETURN
  258.