![]()
The latter is what I do. I use the enclosed perl script to translate
from .html to .ascii formats.
-Alan Hamilton
"Bisexual Resource List" monthly posting
--------------------------------------------------------------------
#! /usr/local/bin/perl
# brl.pl - convert Bisexual Resource List from .html to .txt
# Build the list of component files from the Table Of Contents
open( TOC, "<brl-toc.html" );
while ( <TOC> ) {
next if ! m/^<li>/io;
m/"([^"]*)"/o;
push( @brlfiles, "$1" );
}
close( TOC );
#@brlfiles = reverse( @brlfiles );
printf(STDERR "\@brlfiles=@brlfiles\n");
$BRLTMP = ">brl.tmp";
if ( ! open(BRLTMP) ) { die("cannot open $brltmp"); }
printf(BRLTMP "Bisexual Resource List\n\n");
for $BRLFILE ( @brlfiles ) {
printf(STDERR "$BRLFILE\n");
if ( ! open( BRLFILE ) ) { die("cannot open $brltmp") }
@brlsrc = <BRLFILE>;
#printf(STDERR "@brlsrc");
$brlsrc = join('', @brlsrc);
$brlsrc =~ s,<title>[^<]+</title>,,gio;
$brlsrc =~ s/<dt>/\n/gio;
$brlsrc =~ s/<dd>/ /gio;
$brlsrc =~ s/<p>/ /gio;
$brlsrc =~ s/<[^>]+>//gio;
$brlsrc =~ s/ +\n/\n/og;
$brlsrc =~ s/\n\n\n/\n\n/og;
$brlsrc =~ s/\n\n\n/\n\n/og;
$brlsrc =~ s/\n\n\n/\n\n/og;
$brlsrc =~ s/</</og;
$brlsrc =~ s/&rt;/>/og;
printf(BRLTMP "%s", $brlsrc);
#printf(STDERR "%s", $brlsrc);
}
system("fmt brl.tmp > brl.txt; rm brl.tmp");
[
Usenet Hypertext FAQ Archive |
Search Mail Archive |
Authors |
Usenet
]
[
1993 |
1994 |
1995 |
1996 |
1997
]
![]()
© Copyright The Landfield Group, 1997
All rights reserved