Ignore:
Timestamp:
2001-10-09T17:21:29+13:00 (23 years ago)
Author:
sjboddie
Message:

The build process now creates a summary of how many files were included,
which were rejected, etc. A link to a page containing this summary is
provided from the final page of the collector (once the collection is built
successfully) and from the default "about this collection" text for
collections built by the collector.

Also did a little bit of tidying in a couple of places

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/plugins/ConvertToPlug.pm

    r2755 r2785  
    4848#    @ISA = ('BasPlug'); #, 'HTMLPlug', 'TEXTPlug');
    4949}
    50 
    51 # use strict;  # this breaks 'print $outhandle ' error msgs.
    5250
    5351sub print_usage {
     
    146144    my $outhandle = $self->{'outhandle'};
    147145    my $convert_to = $self->{'convert_to'};
     146    my $failhandle = $self->{'failhandle'};
    148147
    149148    # softlink to collection tmp dir
     
    184183    if ($output_type eq "fail") {
    185184    print $outhandle "Could not convert $tailname$suffix to $convert_to format\n";
    186     if ($self->{'faillogname'} ne "" && -s "$errlog") {
    187         open(SAVELOG, ">>$self->{'faillogname'}");
     185    print $failhandle "$tailname$suffix: " . ref($self) . " failed to convert to $convert_to\n";
     186    $self->{'num_not_processed'} ++;
     187    if (-s "$errlog") {
    188188        open(ERRLOG, "$errlog");
    189         print SAVELOG "$tailname$suffix (converting to $convert_to) failed:\n";
    190189        while (<ERRLOG>) {
    191         print SAVELOG "$_";
     190        print $outhandle "$_";
    192191        }
     192        print $outhandle "\n";
    193193        close ERRLOG;
    194         print SAVELOG "\n";
    195         close SAVELOG;
    196194    }
    197195    &util::rm("$errlog") if (-e "$errlog");
     
    236234
    237235    my $filename = &util::filename_cat($base_dir, $file);
    238     return 0 if $self->{'block_exp'} ne "" && $filename =~ /$self->{'block_exp'}/;
     236    if ($self->{'block_exp'} ne "" && $filename =~ /$self->{'block_exp'}/) {
     237    $self->{'num_blocked'} ++;
     238    return 0;
     239    }
    239240    if ($filename !~ /$self->{'process_exp'}/ || !-f $filename) {
    240241        return undef;
     
    299300    $self->cleanup_tmp_area();
    300301
     302    $self->{'num_processed'} ++;
    301303
    302304    return 1;
Note: See TracChangeset for help on using the changeset viewer.