Changeset 10428
- Timestamp:
- 2005-08-05T15:21:41+12:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugins/WordPlug.pm
r10405 r10428 94 94 'type' => "regexp", 95 95 'reqd' => "no", 96 'deft' => "" }]; 96 'deft' => "" }, 97 { 'name' => "extracted_word_metadata_fields", 98 'type' => "string", 99 'deft' => "Title"}]; 97 100 98 101 push(@$arguments,@$ws_arg); … … 101 104 if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});} 102 105 if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)}; 103 104 #foreach my $arg (@{$hashArgOptLists->{"ArgList"}}) 105 #{ 106 # print STDERR "**** Word Argument =$arg->{'name'}\n"; 107 #} 108 106 my @arg_array = @$inputargs; 109 107 my $self = (defined $hashArgOptLists)? new ConvertToPlug($pluginlist,$inputargs,$hashArgOptLists): new ConvertToPlug($pluginlist,$inputargs); 110 108 … … 115 113 if (defined $self->{'windows_scripting'}) { 116 114 if (!defined $secondary_plugin_options->{'StructuredHTMLPlug'}){ 117 $secondary_plugin_options->{'StructuredHTMLPlug'} = [];115 $secondary_plugin_options->{'StructuredHTMLPlug'} = []; 118 116 my $structhtml_options = $secondary_plugin_options->{'StructuredHTMLPlug'}; 117 if ($self->{'input_encoding'} eq "auto") { 118 $self->{'input_encoding'} = "utf8"; 119 $self->{'extract_language'} = 1; 120 push(@$structhtml_options,"-input_encoding", "utf8"); 121 push(@$structhtml_options,"-extract_language"); 122 123 # Instruct HTMLPlug (when eventually accessed through read_into_doc_obj) 124 # to extract these metadata fields from the HEAD META fields 125 push(@$structhtml_options,"-metadata_fields","Title,GENERATOR,date,author<Creator>"); 126 push(@$structhtml_options , "-title_sub", '^(Page\s+\d+)?(\s*1\s+)?'); 127 } 119 128 } 120 129 } … … 139 148 # to extract these metadata fields from the HEAD META fields 140 149 push(@$html_options,"-metadata_fields","Title,GENERATOR,date,author<Creator>"); 141 #push(@$html_options , "-title_sub", '^(Page\s+\d+)?(\s*1\s+)?');150 push(@$html_options , "-title_sub", '^(Page\s+\d+)?(\s*1\s+)?'); 142 151 } 143 152 144 153 $self = bless $self, $class; 145 $self->load_secondary_plugins($class,$secondary_plugin_options );154 $self->load_secondary_plugins($class,$secondary_plugin_options,$hashArgOptLists); 146 155 147 156 return bless $self; … … 171 180 172 181 # Write it out again! 182 $self->utf8_write_file (\$text, $conv_filename); 173 183 } 174 184 … … 206 216 my $self = shift (@_); 207 217 my ($textref, $pluginfo, $base_dir, $file, $metadata, $doc_obj, $gli) = @_; 208 218 209 219 return $self->process_type("doc", $base_dir, $file, $doc_obj); 210 220 }
Note:
See TracChangeset
for help on using the changeset viewer.