Ignore:
Timestamp:
2005-07-06T15:27:45+12:00 (19 years ago)
Author:
kjdon
Message:

Jeffrey's new parsing modifications, committed approx 6 July, 15.16

File:
1 edited

Legend:

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

    r9960 r10218  
    4646    'type' => "int",
    4747    'deft' => "100",
     48    'range' => "1,",
    4849    'reqd' => "no" },
    4950      { 'name' => "thumbnailtype",
     
    5657    'type' => "int",
    5758    'deft' => "0",
     59    'range' => "1,",
    5860    'reqd' => "no" },
    5961      { 'name' => "screenviewtype",
     
    7173    'type' => "int",
    7274    'deft' => "100",
     75    'range' => "1,",
    7376    'reqd' => "no" } ];
    7477
     
    8285
    8386sub new {
    84     my ($class) = @_;
    85     my $plugin_name = shift (@_);
    86     my $self = new BasPlug ("ImagePlug", @_);
    87     $self->{'plugin_type'} = "ImagePlug";
    88     # 14-05-02 To allow for proper inheritance of arguments - John Thompson
    89     my $option_list = $self->{'option_list'};
    90     push( @{$option_list}, $options );
    91 
    92     if (!parsargv::parse(\@_,
    93              q^noscaleup^, \$self->{'noscaleup'},
    94              q^converttotype/.*/^, \$self->{'converttotype'},
    95              q^minimumsize/[0-9]*/100^, \$self->{'minimumsize'},
    96 
    97              q^thumbnailsize/[0-9]*/100^, \$self->{'thumbnailsize'},
    98              q^thumbnailtype/.*/gif^, \$self->{'thumbnailtype'},
    99              q^screenviewsize/[0-9]*/0^, \$self->{'screenviewsize'},
    100              q^screenviewtype/.*/jpg^, \$self->{'screenviewtype'},
    101              "allow_extra_options")) {
    102    
    103     print STDERR "\nImagePlug uses an incorrect option.\n";
    104     print STDERR "Check your collect.cfg configuration file.\n";
    105     $self->print_txt_usage("");  # Use default resource bundle
    106     die "\n";
    107     }
     87    my ($class) = shift (@_);
     88    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
     89    push(@$pluginlist, $class);
     90
     91    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
     92    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
     93
     94    my $self = (defined $hashArgOptLists)? new BasPlug($pluginlist,$inputargs,$hashArgOptLists): new BasPlug($pluginlist,$inputargs);
    10895
    10996    # Check that ImageMagick is installed and available on the path (except for Windows 95/98)
Note: See TracChangeset for help on using the changeset viewer.