From 5185d4e34e362d183a2c88a894ecb6f76db437f0 Mon Sep 17 00:00:00 2001 From: Jeffrey Armstrong Date: Wed, 19 Oct 2016 20:07:17 -0400 Subject: Additional bug fixes for blog engine. Batch file now launches site generator. --- tmplate.bas | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'tmplate.bas') diff --git a/tmplate.bas b/tmplate.bas index 4a4331f..ca83c31 100644 --- a/tmplate.bas +++ b/tmplate.bas @@ -1,12 +1,3 @@ -100 TMPLATE$ = "TEST.TXT" -110 DIM LBL$[1] -120 DIM REPL$[1] -130 LBL$[1] = "title" -140 REPL$[1] = "JEFFS BLOG" -150 ILBL = 1 -160 GOSUB 18000 -165 PRINT TTEXT$ -170 STOP 18000 REM ============================ 18001 REM Template processing 18002 REM @@ -22,14 +13,16 @@ 18030 WHILE NOT EOF(3) 18040 LINE INPUT#3, L$ 18050 GOSUB 18100 -18060 TTEXT$ = TTEXT$ + CHR$(13) + L$ +18060 TTEXT$ = TTEXT$ + CHR$(13) + CHR$(10) + L$ 18070 WEND 18080 CLOSE #3 +18085 TTEXT$ = TTEXT$ + CHR$(13) + CHR$(10) 18090 RETURN 18100 REM Search for key +18102 ILSTART = 1 18105 IF LEN(L$) < 7 THEN RETURN -18110 FOR IL = 1 TO LEN(L$)-2 -18120 IF MID$(L$, IL, 3) = "{% " THEN GOSUB 18150:GOTO 18100 +18110 FOR IL = ILSTART TO LEN(L$)-2 +18120 IF MID$(L$, IL, 3) = "{% " THEN GOSUB 18150:ILSTART=IL+1:GOTO 18105 18130 NEXT IL 18140 RETURN 18150 REM Find the end of the string @@ -46,4 +39,3 @@ 18260 LNEW$ = LEFT$(L$, IL-1) + REPL$[LBLINDEX] + RIGHT$(L$, LEN(L$)-IJ-2) 18270 L$ = LNEW$ 18280 RETURN - \ No newline at end of file -- cgit v1.2.3