Gilles Frydman <[log in to unmask]> wrote on 14 Aug 1998:
> >[someone else wrote:]
> >You mean like it used to be, rather than this "explanation" stuff
> >we have now? Yeah, I lobbied intensively for listowners to be able
> >to get the old style display as an option but no one payed much attention
[snip]
>
> It doesn't take much to write a perl script to get only some of the info
> you need.
I've been meaning to do this for a while. I hereby submit my effort.
Probably can be improved or redesigned, and based on the fact that I
don't use it often, it may be more clunky than it's worth. Feedback
welcome by direct mail.
En paz,
Steve
--
Stephen W. Thompson, U. of PA, Data Administration, 215-898-1236, WWW has PGP
The only safe choice: Write e-mail as if it's public. Cuz it could be.
== parsequery.p follows: ======================================
# Written by Stephen W. Thompson, [log in to unmask]
# Read results from "query" command sent to listserv as owner, parse
# for other uses
# Syntax: perl parsequery.p output_from_listserv_query_cmd > parsed.lst
# To Do: Make into objects; determine which attribute each option belongs
# to and label it appropriately; create object for common tasks;
# account for different Listserv versions; add disclaimer; parse
# and use the last activity date (?) which follows some entries.
# Released into the public domain, August 1997.
# Disclaimer: This software is available as-is. The author is not responsible
# for damages resulting from use of this program. Etc., etc.
# History:
# 1997/08/21 Program initially written, SWT.
while (( $_ = <> ) !~ /^ *$/ ) { # Assume there are mail headers
# skip to first blank line after headers
} # while header lines
while (<>) {
next if /^> / ;
if ( /^Subscription options for / ) {
# First get their personal info
$built_line = $_ ;
chop( $built_line ) ;
while ( $built_line !~ /:$/ ) {
$_ = <> ;
chop ;
$built_line .= ' ' . $_ ;
} # while more id lines
( $name, $addr, $list ) = $built_line =~
/^Subscription options for "?([^<"]+)"? <([^>]+)>, list ([^:]+):/ ;
# Now go for their subscription options
$_ = <> ; # Should be a blank line prior to options
@options = () ;
while ( ( $_ = <> ) !~ /^ *$/ ) {
if ( /^([A-Z]+) / ) {
push( @options, $1 ) ;
}
} # while options lines
print "$list $addr $name ( " . join( ' ', @options ) . " )\n" ;
} # if
} # while
|