greenstone.org greenstone wiki greenstone trac planet greenstone

Changeset 15881

Show
Ignore:
Timestamp:
2008-06-05 14:27:09 (6 months ago)
Author:
kjdon
Message:

auxiliary plugins now pass an extra argument to the PrintInfo? constructor so that argument parsing is not done - parsing needs to be done by the main plugin which has all the arguments

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • gsdl/trunk/perllib/plugins/AcronymExtractor.pm

    r15867 r15881  
    3333    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)}; 
    3434 
    35     my $self = new PrintInfo($pluginlist, $inputargs, $hashArgOptLists); 
     35    my $self = new PrintInfo($pluginlist, $inputargs, $hashArgOptLists,1); 
    3636 
    3737    return bless $self, $class; 
  • gsdl/trunk/perllib/plugins/DateExtractor.pm

    r15867 r15881  
    4646    push(@{$hashArgOptLists->{"OptList"}},$options); 
    4747 
    48     my $self = new PrintInfo($pluginlist, $inputargs, $hashArgOptLists); 
     48    my $self = new PrintInfo($pluginlist, $inputargs, $hashArgOptLists, 1); 
    4949 
    5050    return bless $self, $class; 
  • gsdl/trunk/perllib/plugins/EmailAddressExtractor.pm

    r15867 r15881  
    3434    push(@{$hashArgOptLists->{"OptList"}},$options); 
    3535 
    36     my $self = new PrintInfo($pluginlist, $inputargs, $hashArgOptLists); 
     36    my $self = new PrintInfo($pluginlist, $inputargs, $hashArgOptLists, 1); 
    3737 
    3838    return bless $self, $class; 
  • gsdl/trunk/perllib/plugins/GISExtractor.pm

    r15872 r15881  
    8080    push(@{$hashArgOptLists->{"OptList"}},$options); 
    8181    #} 
    82     my $self = new PrintInfo($pluginlist, $inputargs, $hashArgOptLists); 
     82    my $self = new PrintInfo($pluginlist, $inputargs, $hashArgOptLists, 1); 
    8383 
    8484    if ($self->{'extract_placenames'}) { 
  • gsdl/trunk/perllib/plugins/ImageConverter.pm

    r15866 r15881  
    8181    push(@{$hashArgOptLists->{"OptList"}},$options); 
    8282 
    83     my $self = new PrintInfo($pluginlist, $inputargs, $hashArgOptLists); 
     83    my $self = new PrintInfo($pluginlist, $inputargs, $hashArgOptLists, 1); 
    8484 
    8585    # Check that ImageMagick is installed and available on the path (except for Windows 95/98) 
  • gsdl/trunk/perllib/plugins/KeyphraseExtractor.pm

    r15867 r15881  
    3636    push(@$pluginlist, $class); 
    3737 
    38     if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});} 
    39     if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)}
     38    push(@{$hashArgOptLists->{"ArgList"}},@{$arguments}); 
     39    push(@{$hashArgOptLists->{"OptList"}},$options)
    4040 
    41     my $self = new PrintInfo($pluginlist, $inputargs, $hashArgOptLists); 
     41    my $self = new PrintInfo($pluginlist, $inputargs, $hashArgOptLists, 1); 
    4242 
    4343    return bless $self, $class; 
  • gsdl/trunk/perllib/plugins/PrintInfo.pm

    r15868 r15881  
    2828                'args'     => $arguments }; 
    2929 
    30  
     30# $auxiliary_plugin argument passed in by "on-the-side" plugin helpers such as Extractors and ImageConverter. We don't want parsing of args done by them. 
    3131sub new  
    3232{ 
    3333    my $class = shift (@_); 
    34     my ($pluginlist,$args,$hashArgOptLists) = @_; 
     34    my ($pluginlist,$args,$hashArgOptLists, $auxiliary) = @_; 
    3535    my $plugin_name = (defined $pluginlist->[0]) ? $pluginlist->[0] : $class; 
    3636 
     
    5555    } 
    5656     
     57    if (defined $auxiliary) { # don't parse the args here 
     58        return bless $self, $class; 
     59    } 
     60 
    5761    if(parse2::parse($args,$hashArgOptLists->{"ArgList"},$self) == -1) 
    5862    { 
    5963        my $classTempClass = bless $self, $class; 
    6064        print STDERR "<BadPlugin p=$plugin_name>\n"; 
    61         &gsprintf(STDERR, "\n{BasPlug.bad_general_option}\n", $plugin_name); 
     65        &gsprintf(STDERR, "\n{PrintInfo.bad_general_option}\n", $plugin_name); 
    6266        $classTempClass->print_txt_usage("");  # Use default resource bundle 
    6367        die "\n";