{Converts a plain text file into basic HTML} uses crt; var f,f1:text; i:integer; path,out,txt,title,text,bg,link:string; c:char; begin if (ParamCount>1) then begin writeln('Too many parameters'); halt(1); end; if (ParamCount=1) then begin if (ParamStr(1)<>'/e') then begin writeln('Wrong parameter'); halt(1); end; end; clrscr; writeln; writeln(' ********** TXT2HTM Converter **********'); writeln; writeln(' Version 1.2'); writeln; writeln(' By Nick Kriukov, 2003'); writeln; write('Enter full path with file name and extension: '); readln(path); write('Enter page title: '); readln(title); if (ParamStr(1)='/e') then begin write('Enter background color (hex or verbal): '); readln(bg); write('Enter text color: '); readln(text); write('Enter link color: '); readln(link); end; write('Enter output file path/name (.HTM extension): '); readln(out); if (length(out)=0) then repeat write('Enter output file path/name (.HTM extension): '); readln(out); until (length(out)>0); assign(f,path); {$I-} reset(f); {$I+} if (ioresult=0) then begin assign(f1,out); rewrite(f1); writeln(f1,''); writeln(f1,''); writeln(f1,''); writeln(f1,'',title,''); writeln(f1,''); writeln(f1,''); writeln(f1,'
');
reset(f);
while not eof(f) do

begin
readln(f,txt);
writeln(f1,txt);
end;

append(f1);
writeln(f1,'
'); writeln(f1,''); writeln(f1,''); close(f1); close(f); writeln; writeln('The converted file was successfully saved in ', out); end else writeln('File not found'); end.