Changeset 9465 for trunk/gsdl


Ignore:
Timestamp:
2005-03-18T14:10:58+13:00 (19 years ago)
Author:
kjdon
Message:

ConvertToPlug now accepts the gli arg in read() and passes it in process(), and all the convert plugins now print a processing message for gli in their process() method.

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

Legend:

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

    r9067 r9465  
    267267sub read {
    268268    my $self = shift (@_);
    269     my ($pluginfo, $base_dir, $file, $metadata, $processor, $maxdocs) = @_;
     269    my ($pluginfo, $base_dir, $file, $metadata, $processor, $maxdocs, $gli) = @_;
    270270#    if ($self->is_recursive()) {
    271271#        die "BasPlug::read function must be implemented in sub-class for recursive plugins\n";
     
    337337    $self->extra_metadata ($doc_obj, $doc_obj->get_top_section(), $metadata);
    338338    # do plugin specific processing of doc_obj
    339     return -1 unless defined ($self->process (\$text, $pluginfo, $base_dir, $file, $metadata, $doc_obj));
     339    return -1 unless defined ($self->process (\$text, $pluginfo, $base_dir, $file, $metadata, $doc_obj, $gli ));
    340340    # do any automatic metadata extraction
    341341    $self->auto_extract_metadata ($doc_obj);
  • trunk/gsdl/perllib/plugins/ExcelPlug.pm

    r6408 r9465  
    7878    print $outhandle "ExcelPlug: passing $_[3] on to $self->{'converted_to'}Plug\n"
    7979    if $self->{'verbosity'} > 1;
     80    print STDERR "<Processing n='$_[3]' p='ExcelPlug'>\n" if ($_[6]);
    8081
    8182    return ConvertToPlug::process_type($self,"xls",@_);
  • trunk/gsdl/perllib/plugins/PDFPlug.pm

    r8795 r9465  
    140140sub process {
    141141    my $self = shift (@_);
     142    #my ($textref, $pluginfo, $base_dir, $file, $metadata, $doc_obj, $gli) = @_;
     143
    142144    my $outhandle=$self->{'outhandle'};
    143145
     
    208210    print $outhandle "PDFPlug: passing $_[3] on to $self->{'converted_to'}Plug\n"
    209211    if $self->{'verbosity'} > 1;
     212    print STDERR "<Processing n='$_[3]' p='PDFPlug'>\n" if ($_[6]);
    210213
    211214    # tell htmlplug to extract these metadata fields from the HEAD META fields
     
    214217    my $result = ConvertToPlug::process_type($self,"pdf",@_);
    215218
    216     my $doc_obj = pop(@_);
    217 
     219    #my $doc_obj = pop(@_);
     220    my $doc_obj = $_[5];
    218221    # fix up the extracted date metadata to be in Greenstone date format,
    219222    # and fix the capitalisation of 'date'
  • trunk/gsdl/perllib/plugins/PPTPlug.pm

    r6408 r9465  
    7676    print $outhandle "PPTPlug: passing $_[3] on to $self->{'converted_to'}Plug\n"
    7777    if $self->{'verbosity'} > 1;
     78    print STDERR "<Processing n='$_[3]' p='PPTPlug'>\n" if ($_[6]);
    7879
    7980    return ConvertToPlug::process_type($self,"ppt",@_);
  • trunk/gsdl/perllib/plugins/PSPlug.pm

    r8171 r9465  
    169169sub process {
    170170    my $self = shift (@_);
    171     my ($trash, $trash2, $path, $file, $trash3, $doc) = @_;
     171    my ($trash, $trash2, $path, $file, $trash3, $doc, $gli) = @_;
    172172
    173173    my $outhandle = $self->{'outhandle'};
    174174    print $outhandle "PSPlug: passing $_[3] on to $self->{'converted_to'}Plug\n"
    175175    if $self->{'verbosity'} > 1;
    176    
     176    print STDERR "<Processing n='$_[3]' p='PDFPlug'>\n" if ($gli);
     177
    177178    &extract_metadata_from_postscript($self,"$path/$file", $doc);
    178179
  • trunk/gsdl/perllib/plugins/RTFPlug.pm

    r6408 r9465  
    7070    print $outhandle "RTFPlug: passing $_[3] on to $self->{'converted_to'}Plug\n"
    7171    if $self->{'verbosity'} > 1;
     72    print STDERR "<Processing n='$_[3]' p='RTFPlug'>\n" if ($_[6]);
    7273
    7374    return ConvertToPlug::process_type($self,"rtf",@_);
  • trunk/gsdl/perllib/plugins/WordPlug.pm

    r6408 r9465  
    7474sub process {
    7575    my $self = shift (@_);
     76    #my ($textref, $pluginfo, $base_dir, $file, $metadata, $doc_obj, $gli) = @_;
    7677
    77     my $outhandle = $self->{'outhandle'};    
     78    my $outhandle = $self->{'outhandle'};
    7879    print $outhandle "WordPlug: passing $_[3] on to $self->{'converted_to'}Plug\n"
    7980    if $self->{'verbosity'} > 1;
    80    
     81    print STDERR "<Processing n='$_[3]' p='WordPlug'>\n" if ($_[6]);
     82
    8183    return ConvertToPlug::process_type($self,"doc",@_);
    8284}
Note: See TracChangeset for help on using the changeset viewer.