Just a sample of the Echomail archive
[ << oldest | < older | list | newer > | newest >> ]
|  Message 537  | ||||||
|  ATREYU to All  | ||||||
|  MakeHTML  | ||||||
|    | ||||||
 
MSGID: 1:229/426 51A4E66A
I had a need to do a quick-n-dirty export of a directory of files into a raw
HTML table output.
The idea is that you have a header file and a footer. You run this to create
the body, then bring it all together via COPY HEADER.HTM + MAKEHTML.HTM +
FOOTER.HTM SOMESITE.HTM
If Files.bbs exists in the directory, it will read it for one-liner
descriptions.
If the file MAKEHTML.--- exists, it will instead read the contents of this
file for generating the table. This is so you can sort the results, ie. DIR
/B /O:-D DB\FILEECHO\NODEDIFF > MAKEHTML.---
The results can be seen at https://fido-z1.darkrealms.ca
Enjoy...
program makehtml;
uses sysutils,dos;
var p,w : string;
dirinfo : SearchRec;
ft : tdatetime;
h,t,t2 : text;
const df = 'mm"/"dd"/"yyyy';
procedure make_html(what : string ; ts : longint);
var d,ds : string;
begin
d:='';
assign(t,p+'files.bbs');
(*$I-*) reset(t);
if ioresult=0 then
begin
while not eof(t) and (d='') do
begin
readln(t,w);
if (pos(uppercase(what),w)>0) then d:=copy(w,length(what)+2,length(w));
end;
close(t);
end;
if (uppercase(paramstr(4))<>'N') and (uppercase(what)<>'FILES.BBS') then
begin
ft:=FileDateToDateTime(ts);ds:=FormatDateTime(df,ft);
writeln(h,' |
[ << oldest | < older | list | newer > | newest >> ]