home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / private / dlcmmr03.zip / MM-TO-QB.BAS < prev    next >
BASIC Source File  |  1993-07-04  |  3KB  |  92 lines

  1. 10 REM PROGRAM NAME IS MM-TO-QB.BAS
  2. 20 REM Written by John P. Nicholson of 1:308/10
  3. 30 REM This basic program has no warranties an is guaranteed to do nothing
  4. 40 REM more than take up disk space on your system.  The code is placed in
  5. 50 REM the public domain and you can do with it as you see fit.  Please
  6. 60 REM keep the documentation with this program if you plan to share it with
  7. 70 REM others.  The intended purpose of this program is to CONVERT MEALMASTER
  8. 80 REM formated recipes to QUIKBOOK formatted recipes.
  9. 90 REM Version 1.4 - Dated 13 March 1991 (Please read the documentation)
  10. 100 REM
  11. 110 DIM Q$(200)
  12. 120 MM5$="------------- Recipe Extracted from Meal-Master (tm) v6.15 --------------------"
  13. 130 MM1$="------------- Recipe Extracted from Meal-Master (tm) v6.14 ------------------"
  14. 140 MM2$="     Title: "
  15. 150 MM3$="Categories: "
  16. 160 MM4$="-----------------------------------------------------------------------------"
  17. 170 MM6$="-------------------------------------------------------------------------------"
  18. 180 QB1$="-Begin Recipe Export- QuikBook version 0.96 Beta A"
  19. 190 QB2$="Title: "
  20. 200 QB3$="Keywords: "
  21. 210 QB4$="-End Recipe Export-"
  22. 220 Q=0
  23. 230 L=0
  24. 240 S=0
  25. 250 FIN$="MEALMAST"
  26. 260 REM "This is where we open 2 files for I/O"
  27. 270 OPEN FIN$ FOR INPUT AS 1
  28. 280 OPEN "MM-QBOUT" FOR OUTPUT AS 2 LEN=79
  29. 290 LINE INPUT#1, AA$
  30. 300 L=L+1
  31. 310 IF EOF(1) THEN 890
  32. 320 IF AA$ = MM5$ THEN GOTO 390
  33. 330 IF AA$ = MM1$ THEN GOTO 390
  34. 340 IF LEFT$(AA$,12) = MM2$ THEN GOTO 470
  35. 350 IF LEFT$(AA$,12) = MM3$ THEN GOTO 530
  36. 360 IF AA$ = MM6$ THEN GOTO 750
  37. 370 IF AA$ = MM4$ THEN GOTO 750 ELSE GOTO 800
  38. 380 PRINT "ERROR IN LINE";L;"of input file."
  39. 390 Q=Q+1
  40. 400 Q$(Q)=QB1$
  41. 410 LINE INPUT#1, AA$
  42. 420 L=L+1
  43. 430 IF EOF(1) THEN 890
  44. 440 Q=Q+1
  45. 450 Q$(Q)=AA$
  46. 460 GOTO 290
  47. 470 Q=Q+1
  48. 480 F=LEN(AA$)-12
  49. 490 BB$=MID$(AA$,13,F)
  50. 500 AA$=QB2$+BB$
  51. 510 Q$(Q)=AA$
  52. 520 GOTO 290
  53. 530 Q=Q+1
  54. 540 X=1
  55. 550 E=LEN(AA$)-12
  56. 560 BB$=MID$(AA$,13,E)
  57. 570 E=LEN(BB$)
  58. 580 IF LEFT$(BB$,9) <> "Main dish" THEN GOTO 590 ELSE GOTO 600
  59. 590 IF LEFT$(BB$,9) =  "Side dish" THEN GOTO 600 ELSE GOTO 610
  60. 600 X=9
  61. 610 G=E
  62. 620 FOR R = X TO G
  63. 630   IF MID$(BB$,E,1) <> " " THEN GOTO 650
  64. 640   E=E-1
  65. 650 NEXT R
  66. 660 FOR S = X TO E
  67. 670    IF MID$(BB$,S,1) = " " THEN GOTO 680 ELSE GOTO 710
  68. 680    FOR D = 1 TO 1
  69. 690      MID$(BB$,S,S+1) = ","
  70. 700    NEXT D
  71. 710  NEXT S
  72. 720 AA$=QB3$+BB$
  73. 730 Q$(Q)=AA$
  74. 740 GOTO 290
  75. 750 Q=Q+1
  76. 760 Q$(Q)=" "
  77. 770 Q=Q+1
  78. 780 Q$(Q)=QB4$
  79. 790 GOTO 830
  80. 800 Q=Q+1
  81. 810 Q$(Q)=AA$
  82. 820 GOTO 290
  83. 830 FOR M = 1 TO Q
  84. 840   PRINT#2, Q$(M)
  85. 850 NEXT M
  86. 860 Q=0
  87. 870 PRINT L
  88. 880 GOTO 290
  89. 890 PRINT "E.O.F. at Line ";L
  90. 900 CLOSE
  91. 910 END
  92.