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

    r10121 r10218  
    9292    'desc' => "{HTMLPlug.description_tags}",
    9393    'type' => "flag" },
     94      # retain this for backward compatibility (w3mir option was replaced by
     95      # file_is_url)
     96      { 'name' => "w3mir",
     97#   'desc' => "{HTMLPlug.w3mir}",
     98    'type' => "flag",
     99    'hiddengli' => "yes"},
    94100      { 'name' => "no_strip_metadata_html",
    95101    'desc' => "{HTMLPlug.no_strip_metadata_html}",
     
    109115
    110116sub new {
    111     my $class = shift (@_);
    112     my $self = new BasPlug ($class, @_);
    113     $self->{'plugin_type'} = "HTMLPlug";
    114     # 14-05-02 To allow for proper inheritance of arguments - John Thompson
    115     my $option_list = $self->{'option_list'};
    116     push( @{$option_list}, $options );
    117    
    118     if (!parsargv::parse(\@_,
    119              q^nolinks^, \$self->{'nolinks'},
    120              q^keep_head^, \$self->{'keep_head'},
    121              q^no_metadata^, \$self->{'no_metadata'},
    122              q^metadata_fields/.*/Title^, \$self->{'metadata_fields'},
    123              q^hunt_creator_metadata^, \$self->{'hunt_creator_metadata'},
    124              q^w3mir^, \$self->{'w3mir'},
    125              q^file_is_url^, \$self->{'file_is_url'},
    126              q^assoc_files/.*/(?i)\.(jpe?g|jpe|gif|png|css)$^, \$self->{'assoc_files'},
    127              q^rename_assoc_files^, \$self->{'rename_assoc_files'},
    128              q^title_sub/.*/^, \$self->{'title_sub'},
    129              q^description_tags^, \$self->{'description_tags'},
    130              q^no_strip_metadata_html/.*/^, \$self->{'no_strip_metadata_html'},
    131              q^sectionalise_using_h_tags^, \$self->{'sectionalise_using_h_tags'},
    132              "allow_extra_options")) {
    133 
    134     print STDERR "\nIncorrect options passed to HTMLPlug, check your collect.cfg configuration file\n";
    135     $self->print_txt_usage("");  # Use default resource bundle
    136     die "\n";
    137     }
    138 
    139     # retain this for backward compatibility (w3mir option was replaced by
    140     # file_is_url)
     117    my ($class) = shift (@_);
     118    my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
     119    push(@$pluginlist, $class);
     120
     121    if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
     122    if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
     123
     124    my $self = (defined $hashArgOptLists)? new BasPlug($pluginlist,$inputargs,$hashArgOptLists): new BasPlug($pluginlist,$inputargs);
     125
    141126    if ($self->{'w3mir'}) {
    142127    $self->{'file_is_url'} = 1;
     
    146131    $self->{'dir_num'} = 0;
    147132    $self->{'file_num'} = 0;
    148 
     133   
    149134    return bless $self, $class;
    150135}
Note: See TracChangeset for help on using the changeset viewer.