diff --git a/lib/SLUB/LZA/TA/Command/report.pm b/lib/SLUB/LZA/TA/Command/report.pm index 3a5a190fa422e88bfedca4c66ad59a9b3fb70487..eec1ced1df69ec7689dd8dde02e77462638198c9 100644 --- a/lib/SLUB/LZA/TA/Command/report.pm +++ b/lib/SLUB/LZA/TA/Command/report.pm @@ -170,7 +170,7 @@ sub validate_args { my $to_epoch = Date_to_Time($to_year, $to_month, $to_day, 0, 0, 0); $self->usage_error('--date-to should have a date newer than --date-from')if ($from_epoch > $to_epoch); printf STDERR "reporting for period %04u-%02u-%02u … %04u-%02u-%02u\n", $from_year, $from_month, $from_day, $to_year, $to_month, $to_day; - say STDERR "HINT: the option '--with-ldp' results in lot of processing time and network traffic, use it with care!" if (exists $opt->{with_ldp}); + say STDERR "HINT: the option '--with-ldp' results in lot of processing time and network traffic, use it with care!" if (exists $opt->{with_ldp}); say STDERR "HINT: the option '--with-filetypes' results in lot of processing time and network traffic, use it with care!" if (exists $opt->{with_filetypes}); $opt->{creationdate_epochs}->{from} = $from_epoch; $opt->{creationdate_epochs}->{to} = $to_epoch; @@ -561,15 +561,27 @@ sub print_humanreadable_report ($results) { = Report from $results->{from} to $results->{to} RPTHEADER + say "== Complete archive\n"; foreach my $flavour (sort keys %{$results->{flavour}}) { - - say "== $flavour\n"; - foreach my $aipstate (AIPSTATE) { - printf "* %10s:\n", $aipstate; + say "=== $flavour\n"; + foreach my $aip_state (AIPSTATE) { + printf "* %10s:\n", $aip_state; + #use Data::Printer; p($results->{flavour}->{$flavour}->{$aip_state}); #die; foreach my $set (SETS) { - printf "** %15s: %10u\n", - $set, - $results->{flavour}->{$flavour}->{$aipstate}->{$set}->{""}; + foreach my $filter (sort keys %{$results->{flavour}->{$flavour}->{$aip_state}->{$set}}) { +#say "FILTER='$filter'"; + if ($filter eq "") { + printf "** %15s: %10u\n", + "$set", + $results->{flavour}->{$flavour}->{$aip_state}->{$set}->{""} + ; + } else { + printf "*** %25s: %10u\n", + $filter, + $results->{flavour}->{$flavour}->{$aip_state}->{$set}->{$filter} + ; + } + } } say; }