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/PSPlug.pm

    r9467 r10218  
    6262
    6363sub new {
    64     my $class = shift (@_);
     64    my ($class) = shift (@_);
     65    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
     66    push(@$pluginlist, $class);
    6567
    66     # title_sub removes leading "Page 1" or "1 " from auto-extracted title.
     68    push(@$inputargs,"-convert_to");
     69    push(@$inputargs,"text");
     70    push(@$inputargs,"-title_sub");
     71    push(@$inputargs,'^(Page\s+\d+)?(\s*1\s+)?');
    6772
    68     my $self = new ConvertToPlug ($class, "-convert_to", "text", @_ , "-title_sub", '^(Page\s+\d+)?(\s*1\s+)?');
    69     $self->{'plugin_type'} = "PSPlug";
    70     # 14-05-02 To allow for proper inheritance of arguments - John Thompson
    71     my $option_list = $self->{'option_list'};
    72     push( @{$option_list}, $options );
    73    
    74     if (!parsargv::parse(\@_,
    75              q^extract_date^, \$self->{'extract_date'},
    76              q^extract_pages^, \$self->{'extract_pages'},
    77              q^extract_title^, \$self->{'extract_title'},
    78              "allow_extra_options")) {
    79     print STDERR "\nIncorrect options passed to HTMLPlug, check your collect.cfg configuration file\n";
    80     $self->print_txt_usage("");  # Use default resource bundle
    81     die "\n";
    82     }
     73    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
     74    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
     75
     76    my $self = (defined $hashArgOptLists)? new ConvertToPlug($pluginlist,$inputargs,$hashArgOptLists): new ConvertToPlug($pluginlist,$inputargs);
    8377
    8478    return bless $self, $class;
Note: See TracChangeset for help on using the changeset viewer.