Changeset 10423
- Timestamp:
- 2005-08-05T15:09:09+12:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugins/ConvertToPlug.pm
r10406 r10423 24 24 # 25 25 ########################################################################### 26 26 27 # This plugin is inherited by such plugins as WordPlug, PPTPlug, PSPlug, RTFPlug 27 28 # and PDFPlug. It facilitates the conversion of these document types to either … … 121 122 { 122 123 my $self = shift (@_); 123 my ($class,$ plugin_options) = @_;124 my ($class,$input_args,$hashArgOptLists) = @_; 124 125 125 126 my @convert_to_list = split(",",$self->{'convert_to'}); … … 134 135 135 136 # call its constructor with extra options that we've worked out! 136 my $arglist = $ plugin_options->{$plugin_class};137 my $secondary_plugin = new $plugin_class([], \@$arglist);137 my $arglist = $input_args->{$plugin_class}; 138 my $secondary_plugin = new $plugin_class([],$arglist, $hashArgOptLists); 138 139 $secondary_plugins->{$plugin_class} = $secondary_plugin; 139 140 } … … 158 159 my $self = {}; 159 160 my $plugin_class =""; 160 # If the WordPlug -windows_scripting is on, we will call StructuredHTMLPlug to format the161 # HTML documents and then pass to HTMLPlug162 161 if ($classPluginName eq "WordPlug" && $blnWindowsScripting eq "true" && 163 162 $ENV{'GSDLOS'} =~ /^windows$/i) { … … 185 184 elsif ($strConvertTo eq "text") 186 185 { 187 #$self = (defined $hashArgOptLists)? new TEXTPlug($pluginlist,$inputargs,$hashArgOptLists): new TEXTPlug($pluginlist,$inputargs);188 186 $self->{'convert_to'} = "TEXT"; 189 187 $self->{'convert_to_ext'} = "txt"; … … 193 191 } 194 192 elsif ($strConvertTo =~ /pagedimg.*/i){ 195 # #$self = (defined $hashArgOptLists)? new PagedImgPlug($pluginlist,$inputargs,$hashArgOptLists): new PagedImgPlug($pluginlist,$inputargs);196 193 $self->{'convert_to'} = "PagedImg"; 197 194 my $convert_to_ext = $strConvertTo; … … 237 234 sub deinit { 238 235 # called only once, after all plugin passes have been done 236 239 237 my ($self) = @_; 240 238 … … 448 446 # process the document 449 447 $processor->process($doc_obj); 450 # We don't clear up the tmp directory here, the tmp directory will be deleted if the user setup -removeold option 451 # in the import.pl 452 #$self->cleanup_tmp_area(); 448 ##$self->cleanup_tmp_area(); 453 449 454 450 $self->{'num_processed'} ++;
Note:
See TracChangeset
for help on using the changeset viewer.