home *** CD-ROM | disk | FTP | other *** search
- 10 REM PROGRAM NAME IS CC-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 COMPUCHEF
- 80 REM formated recipes to QUIKBOOK formatted recipes.
- 90 REM Version 1.2 - Dated 16 March 1991 (Please read the documentation)
- 100 REM
- 110 DIM Q$(200)
- 120 MM1$=" ***********"
- 130 MM2$=" ***** "
- 140 MM3$=" Categories: "
- 150 MM4$=" *** Recipe Via Compu-Chef"
- 160 QB1$="-Begin Recipe Export- QuikBook version 0.96 Beta A"
- 170 QB2$="Title: "
- 180 QB3$="Keywords: "
- 190 QB4$="-End Recipe Export-"
- 200 Q=0
- 210 H=0
- 220 L=0
- 230 S=0
- 240 FIN$="COMPCHEF"
- 250 REM "This is where we open 2 files for I/O"
- 260 OPEN FIN$ FOR INPUT AS 1
- 270 OPEN "CC-QBOUT" FOR OUTPUT AS 2 LEN=79
- 280 LINE INPUT#1, AA$
- 290 L=L+1
- 300 IF EOF(1) THEN 750
- 310 IF LEFT$(AA$,15) = MM1$ THEN GOTO 360
- 320 IF LEFT$(AA$,10) = MM2$ THEN GOTO 430
- 330 IF LEFT$(AA$,16) = MM3$ THEN GOTO 530
- 340 IF LEFT$(AA$,29) = MM4$ THEN GOTO 600 ELSE GOTO 660
- 350 PRINT "ERROR IN LINE";L;"of input file."
- 360 IF H=1 THEN GOTO 280
- 370 Q=Q+1
- 380 Q$(Q)=QB1$
- 390 H=1
- 400 Q=Q+1
- 410 Q$(Q)=" "
- 420 GOTO 280
- 430 Q=Q+1
- 440 F=LEN(AA$)-16
- 450 BB$=MID$(AA$,11,F)
- 460 AA$=QB2$+BB$
- 470 Q$(Q)=AA$
- 480 LINE INPUT#1, AA$
- 490 L=L+1
- 500 LINE INPUT#1,AA$
- 510 L=L+1
- 520 GOTO 280
- 530 Q=Q+1
- 540 E=LEN(AA$)
- 550 BB$=MID$(AA$,17,E)
- 560 E=LEN(BB$)
- 570 GOSUB 780
- 580 Q$(Q)=AA$
- 590 GOTO 280
- 600 Q=Q+1
- 610 Q$(Q)=" "
- 620 Q=Q+1
- 630 Q$(Q)=QB4$
- 640 H=0
- 650 GOTO 690
- 660 Q=Q+1
- 670 Q$(Q)=AA$
- 680 GOTO 280
- 690 FOR M = 1 TO Q
- 700 PRINT#2, Q$(M)
- 710 NEXT M
- 720 Q=0
- 730 PRINT L
- 740 GOTO 280
- 750 PRINT "E.O.F. at Line ";L
- 760 CLOSE
- 770 END
- 780 X = 1
- 790 IF E >= 17 THEN GOTO 830
- 800 CC$=BB$
- 810 AA$=QB3$+CC$
- 820 RETURN
- 830 IF E >= 33 THEN GOTO 920
- 840 FOR S = 1 TO E
- 850 IF MID$(BB$,S,1) <> " " THEN GOTO 880
- 860 A = S-1
- 870 GOTO 890
- 880 NEXT S
- 890 DD$ = MID$(BB$,1,A)+", "+MID$(BB$,17,E)
- 900 AA$=QB3$+DD$
- 910 RETURN
- 920 FOR S = 1 TO E
- 930 IF MID$(BB$,S,1) <> " " THEN GOTO 960
- 940 A = S-1
- 950 GOTO 970
- 960 NEXT S
- 970 TT$ = MID$(BB$,1,A)+", "+MID$(BB$,17,E)
- 980 F = LEN(TT$)
- 990 FOR S = A+3 TO F
- 1000 IF MID$(TT$,S,1) <> " " THEN GOTO 1030
- 1010 B = S-1
- 1020 GOTO 1040
- 1030 NEXT S
- 1040 EE$ = MID$(TT$,1,B)+", "+MID$(BB$,33,E)
- 1050 AA$=QB3$+EE$
- 1060 RETURN
-