Changeset 16104


Ignore:
Timestamp:
2008-06-23T12:13:46+12:00 (16 years ago)
Author:
kjdon
Message:

tried to make the 'xxxplugin processing file' print statements more consistent. They are now done in read (or read_into_doc_obj) and not process

Location:
gsdl/trunk/perllib/plugins
Files:
17 edited

Legend:

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

    r15872 r16104  
    114114    # Ignore things we can't use
    115115    return 0 if ($$textref =~ /^\@String/);
    116 
    117     # Report that we're processing the file
    118     print STDERR "<Processing n='$file' p='BibTexPlugin'>\n" if ($gli);
    119     print $outhandle "BibTexPlugin: processing $file\n"
    120     if ($self->{'verbosity'}) > 1;
    121 
    122116
    123117    # This hash translates BibTex field names into metadata names.  The
  • gsdl/trunk/perllib/plugins/CSVPlugin.pm

    r15872 r16104  
    143143    my @csv_file_fields = @{$self->{'csv_file_fields'}};
    144144
    145     # Report that we're processing the file
    146     print STDERR "\n<Processing n='$file' p='CSVPlugin'>\n" if ($gli);
    147     print $outhandle "CSVPlugin: processing $file\n" if ($self->{'verbosity'}) > 1;
    148 
    149145    # Add the raw line as the document text
    150146    $doc_obj->add_utf8_text($section, $csv_line);
  • gsdl/trunk/perllib/plugins/DBPlugin.pm

    r16019 r16104  
    8989    my $verbosity = $self->{'verbosity'};
    9090
     91    print STDERR "<Processing n='$file' p='DBPlugin'>\n" if ($gli);
    9192    print $outhandle "DBPlugin: processing $file\n"
    9293    if $self->{'verbosity'} > 1;
  • gsdl/trunk/perllib/plugins/EmailPlugin.pm

    r16013 r16104  
    164164    return undef;
    165165    }
    166 
    167 
    168     print STDERR "<Processing n='$file' p='EmailPlugin'>\n" if ($gli);
    169 
    170     gsprintf($outhandle, "EmailPlugin: {common.processing} $file\n")
    171     if $self->{'verbosity'} > 1;
    172166
    173167    my $cursection = $doc_obj->get_top_section();
  • gsdl/trunk/perllib/plugins/FavouritesPlugin.pm

    r16019 r16104  
    8080
    8181    my $section = $doc_obj->get_top_section();
    82     print STDERR "<Processing n='$file' p='FavouritesPlugin'>\n" if ($gli);
    83     print $outhandle "FavouritesPlugin: processing $file\n" if $self->{'verbosity'} > 1;
    8482
    8583    # don't want mg to turn escape chars into actual values
  • gsdl/trunk/perllib/plugins/HTMLPlugin.pm

    r16024 r16104  
    616616    my $outhandle = $self->{'outhandle'};
    617617
    618     print STDERR "<Processing n='$file' p='HTMLPlugin'>\n" if ($gli);
    619 
    620     print $outhandle "HTMLPlugin: processing $file\n"
    621     if $self->{'verbosity'} > 1;
    622 
    623618    if ($ENV{'GSDLOS'} =~ /^windows/i) {
    624619    # this makes life so much easier... perl can cope with unix-style '/'s.
  • gsdl/trunk/perllib/plugins/ISISPlugin.pm

    r15872 r16104  
    185185    my $isis_record_html_metadata_value = "<table cellpadding=\"4\" cellspacing=\"0\">";
    186186
    187     # Report that we're processing the file
    188     print STDERR "\n<Processing n='$file' p='ISISPlugin'>\n" if ($gli);
    189     print $outhandle "IsisPlug: processing $file\n" if ($self->{'verbosity'}) > 1;
    190 
    191187    # Process each line of the ISIS record, one at a time
    192188    foreach my $line (split(/\n/, $$textref)) {
  • gsdl/trunk/perllib/plugins/LaTeXPlugin.pm

    r16019 r16104  
    9494    }
    9595    my $outhandle = $self->{'outhandle'};
    96     if ($gli) {
    97     print STDERR "<Processing n='$file' p='LaTeXPlugin'>\n";
    98     } elsif ($self->{'verbosity'} > 1) {
    99     print $outhandle "LaTeXPlugin: processing $file\n"
    100     }
     96
    10197    my $cursection = $doc_obj->get_top_section();
    10298
  • gsdl/trunk/perllib/plugins/MARCPlugin.pm

    r16013 r16104  
    272272    }
    273273
    274     print STDERR "<Processing n='$file' p='MARCPlugin'>\n" if ($gli);
    275     print $outhandle "MARCPlugin: processing $file\n"
    276     if $self->{'verbosity'} > 1;
    277 
    278274    my $cursection = $doc_obj->get_top_section();
    279275
  • gsdl/trunk/perllib/plugins/MediaWikiPlugin.pm

    r15887 r16104  
    121121    my $outhandle = $self->{'outhandle'};
    122122
    123     print $outhandle "MediaWikiPlugin: processing $file\n" if $self->{'verbosity'} > 1;
    124          
    125123    my @head_and_body = split(/<body/i,$$textref);
    126124    my $head = shift(@head_and_body);
  • gsdl/trunk/perllib/plugins/OpenDocumentPlugin.pm

    r16013 r16104  
    167167    return $block_status if ((!defined $block_status) || ($block_status==0));
    168168
     169    # Report that we're processing the file
     170    print STDERR "<Processing n='$file' p='OpenDocumentPlugin'>\n" if ($gli);
     171    print $outhandle "OpenDocumentPlugin: processing $file\n"
     172    if ($self->{'verbosity'}) > 1;
     173
    169174    $file =~ s/^[\/\\]+//; # $file often begins with / so we'll tidy it up
    170175    $self->{'file'} = $file;
  • gsdl/trunk/perllib/plugins/ProCitePlugin.pm

    r15872 r16104  
    160160    my $filename = &util::filename_cat($base_dir, $file);
    161161    my $cursection = $doc_obj->get_top_section();
    162     # Report that we're processing the file
    163     print STDERR "<Processing n='$file' p='ProCitePlugin'>\n" if ($gli);
    164     print $outhandle "ProCitePlugin: processing $file\n"
    165     if ($self->{'verbosity'}) > 1;
    166162
    167163    # Build up an HTML view of the record for easy display at run-time
  • gsdl/trunk/perllib/plugins/ReferPlugin.pm

    r15872 r16104  
    115115}
    116116
    117 # The process function reads a single bibliogrphic record and stores
     117# The process function reads a single bibliographic record and stores
    118118# it as a new document.
    119119
     
    127127
    128128    my $cursection = $doc_obj->get_top_section();
    129     # Report that we're processing the file
    130     print STDERR "<Processing n='$file' p='ReferPlugin'>\n" if ($gli);
    131     print $outhandle "ReferPlugin: processing $file\n"
    132     if ($self->{'verbosity'}) > 1;
    133129
    134130    my %field = ('H', 'Header',
  • gsdl/trunk/perllib/plugins/SourceCodePlugin.pm

    r16019 r16104  
    104104    my ($textref, $pluginfo, $base_dir, $file, $metadata, $doc_obj, $gli) = @_;
    105105    my $outhandle = $self->{'outhandle'};
    106    
    107     print STDERR "<Processing n='$file' p='SourceCodePlugin'>\n" if ($gli);
    108     print $outhandle "SourceCodePlugin: processing $file\n"
    109     if $self->{'verbosity'} > 1;
    110106   
    111107    my $cursection = $doc_obj->get_top_section();
  • gsdl/trunk/perllib/plugins/SplitTextFile.pm

    r15871 r16104  
    207207    return 0; # not processed but no point in passing it on
    208208    }
     209
     210    print STDERR "<Processing n='$file' p='$self->{'plugin_type'}'>\n" if ($gli);
     211    print $outhandle "$self->{'plugin_type'} processing $file\n"
     212        if $self->{'verbosity'} > 1;   
    209213
    210214    my $language = $le_rec->{'language'};
     
    252256
    253257    # do plugin specific processing of doc_obj
    254     print $outhandle "segment $segment - " if ($self->{'verbosity'});
     258    print $outhandle "segment $segment\n" if ($self->{'verbosity'});
    255259    $status = $self->process (\$segtext, $pluginfo, $base_dir, $file, $metadata, $doc_obj, $gli);
    256260    if (!defined $status) {
  • gsdl/trunk/perllib/plugins/StructuredHTMLPlugin.pm

    r15872 r16104  
    102102    my $outhandle = $self->{'outhandle'};
    103103
    104     print $outhandle "StructuredHTMLPlugin: processing $file\n"
    105         if $self->{'verbosity'} > 1;
    106    
    107104    my @head_and_body = split(/<body/i,$$textref);
    108105    my $head = shift(@head_and_body);
  • gsdl/trunk/perllib/plugins/TextPlugin.pm

    r15872 r16104  
    8585    my ($textref, $pluginfo, $base_dir, $file, $metadata, $doc_obj, $gli) = @_;
    8686    my $outhandle = $self->{'outhandle'};
    87 
    88     print STDERR "<Processing n='$file' p='TextPlugin'>\n" if ($gli);
    89     print $outhandle "TextPlugin xx: processing $file\n"
    90     if $self->{'verbosity'} > 1;
    9187   
    9288    my $cursection = $doc_obj->get_top_section();
Note: See TracChangeset for help on using the changeset viewer.