#! /usr/bin/perl -w
# vim:syntax=perl
use strict;

use lib '/usr/share/perl5';

use Getopt::Long;
use Lire::Config;
use Lire::Logger qw/lr_err lr_info/;
use Lire::Program qw/ $PROG /;
use Lire::ReportParser::AsciiWriter;

my $parser = new Lire::ReportParser::AsciiWriter();
eval { $parser->parse(\*STDIN) };
lr_err( $@ ) if $@;
lr_info( "parsing xml finished" );

exit 0;

__END__

=pod

=head1 NAME

lr_xml2ascii - generate a formatted report from a raw xml report

=head1 SYNOPSIS

B<lr_xml2ascii> 

=head1 DESCRIPTION

B<lr_xml2ascii> reads a raw xml report from stdin, and prints a nicely
formatted ascii report on stdout. Under some circumstances, it's
needed to tweak LD_LIBRARY_PATH and PERL5LIB, in order to enable
Lire::ReportParser to find XML::Parser. Sourcing
/etc/lire/defaults tackles all these issues with environment
variables.

This script is run automatically by lr_log2report(1), and, in a client
setup, by lr_rawmail2mail(1).

=head1 SEE ALSO

lr_dlf2xml(1), lr_log2report(1)

=head1 VERSION

$Id: lr_xml2ascii.in,v 1.51 2004/03/30 17:40:30 wsourdeau Exp $

=head1 COPYRIGHT

Copyright (C) 2000-2002 Stichting LogReport Foundation LogReport@LogReport.org

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

=head1 AUTHOR

Egon Willighagen

=cut

# Local Variables:
# mode: cperl
# End:
