#!/usr/bin/perl

use strict;
use warnings;

use Carp qw(confess);
use Data::Dumper;
# use Getopt::Std;

use Ernad::Args;
use Ernad::Erimp;
# use Ernad::Presort::Seeds;
use Ernad::Indat::Sborn;
use Ernad::Indat::Report;
use Ernad::Indat::Otria;


our ($impna, $e, $repcode);
&Ernad::Args::parse();
$e=Ernad::Erimp->new({'impna'=> $impna,
                      'repcode'=>$repcode,
                      'verbose'=>3});
#if(not $repcode) {
#  print "I don't see your repcode.\n";
#  exit;
#}

my $r=Ernad::Indat::Report->new();
my $s=Ernad::Indat::Sborn->new();

## so we don't have to run the otria twice
my $report_list=$r->gather_all_reports();

my $doc=$s->report_xml($report_list);


$s->show('reports',$doc);

exit;

__END__;
