home *** CD-ROM | disk | FTP | other *** search
- 10 REM PROGRAM NAME IS MM-TO-QB.BAS
- 20 REM Written by John P. Nicholson of 1:308/10
- 30 REM This basic program has no warranties an is guaranteed to do nothing
- 40 REM more than take up disk space on your system. The code is placed in
- 50 REM the public domain and you can do with it as you see fit. Please
- 60 REM keep the documentation with this program if you plan to share it with
- 70 REM others. The intended purpose of this program is to CONVERT MEALMASTER
- 80 REM formated recipes to QUIKBOOK formatted recipes.
- 90 REM Version 1.4 - Dated 13 March 1991 (Please read the documentation)
- 100 REM
- 110 DIM Q$(200)
- 120 MM5$="------------- Recipe Extracted from Meal-Master (tm) v6.15 --------------------"
- 130 MM1$="------------- Recipe Extracted from Meal-Master (tm) v6.14 ------------------"
- 140 MM2$=" Title: "
- 150 MM3$="Categories: "
- 160 MM4$="-----------------------------------------------------------------------------"
- 170 MM6$="-------------------------------------------------------------------------------"
- 180 QB1$="-Begin Recipe Export- QuikBook version 0.96 Beta A"
- 190 QB2$="Title: "
- 200 QB3$="Keywords: "
- 210 QB4$="-End Recipe Export-"
- 220 Q=0
- 230 L=0
- 240 S=0
- 250 FIN$="MEALMAST"
- 260 REM "This is where we open 2 files for I/O"
- 270 OPEN FIN$ FOR INPUT AS 1
- 280 OPEN "MM-QBOUT" FOR OUTPUT AS 2 LEN=79
- 290 LINE INPUT#1, AA$
- 300 L=L+1
- 310 IF EOF(1) THEN 890
- 320 IF AA$ = MM5$ THEN GOTO 390
- 330 IF AA$ = MM1$ THEN GOTO 390
- 340 IF LEFT$(AA$,12) = MM2$ THEN GOTO 470
- 350 IF LEFT$(AA$,12) = MM3$ THEN GOTO 530
- 360 IF AA$ = MM6$ THEN GOTO 750
- 370 IF AA$ = MM4$ THEN GOTO 750 ELSE GOTO 800
- 380 PRINT "ERROR IN LINE";L;"of input file."
- 390 Q=Q+1
- 400 Q$(Q)=QB1$
- 410 LINE INPUT#1, AA$
- 420 L=L+1
- 430 IF EOF(1) THEN 890
- 440 Q=Q+1
- 450 Q$(Q)=AA$
- 460 GOTO 290
- 470 Q=Q+1
- 480 F=LEN(AA$)-12
- 490 BB$=MID$(AA$,13,F)
- 500 AA$=QB2$+BB$
- 510 Q$(Q)=AA$
- 520 GOTO 290
- 530 Q=Q+1
- 540 X=1
- 550 E=LEN(AA$)-12
- 560 BB$=MID$(AA$,13,E)
- 570 E=LEN(BB$)
- 580 IF LEFT$(BB$,9) <> "Main dish" THEN GOTO 590 ELSE GOTO 600
- 590 IF LEFT$(BB$,9) = "Side dish" THEN GOTO 600 ELSE GOTO 610
- 600 X=9
- 610 G=E
- 620 FOR R = X TO G
- 630 IF MID$(BB$,E,1) <> " " THEN GOTO 650
- 640 E=E-1
- 650 NEXT R
- 660 FOR S = X TO E
- 670 IF MID$(BB$,S,1) = " " THEN GOTO 680 ELSE GOTO 710
- 680 FOR D = 1 TO 1
- 690 MID$(BB$,S,S+1) = ","
- 700 NEXT D
- 710 NEXT S
- 720 AA$=QB3$+BB$
- 730 Q$(Q)=AA$
- 740 GOTO 290
- 750 Q=Q+1
- 760 Q$(Q)=" "
- 770 Q=Q+1
- 780 Q$(Q)=QB4$
- 790 GOTO 830
- 800 Q=Q+1
- 810 Q$(Q)=AA$
- 820 GOTO 290
- 830 FOR M = 1 TO Q
- 840 PRINT#2, Q$(M)
- 850 NEXT M
- 860 Q=0
- 870 PRINT L
- 880 GOTO 290
- 890 PRINT "E.O.F. at Line ";L
- 900 CLOSE
- 910 END
-