Changeset 10218 for trunk/gsdl/perllib/plugins/HTMLPlug.pm
- Timestamp:
- 2005-07-06T15:27:45+12:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugins/HTMLPlug.pm
r10121 r10218 92 92 'desc' => "{HTMLPlug.description_tags}", 93 93 '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"}, 94 100 { 'name' => "no_strip_metadata_html", 95 101 'desc' => "{HTMLPlug.no_strip_metadata_html}", … … 109 115 110 116 sub 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 141 126 if ($self->{'w3mir'}) { 142 127 $self->{'file_is_url'} = 1; … … 146 131 $self->{'dir_num'} = 0; 147 132 $self->{'file_num'} = 0; 148 133 149 134 return bless $self, $class; 150 135 }
Note:
See TracChangeset
for help on using the changeset viewer.