Changeset 25742 for main/trunk/greenstone2/perllib/plugins/SplitTextFile.pm
- Timestamp:
- 2012-06-05T12:39:41+12:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/SplitTextFile.pm
r23352 r25742 121 121 $extrametakeys, $extrametadata, $extrametafile, 122 122 $processor, $gli, $aux) = @_; 123 124 # returns 1 if matches process_exp 125 my $matched = $self->SUPER::metadata_read($pluginfo, $base_dir, $file, 126 $block_hash, 127 $extrametakeys, 128 $extrametadata, 129 $extrametafile, 130 $processor, $gli, $aux); 131 my $split_matched = undef; 132 133 if ($matched) { 134 135 my $outhandle = $self->{'outhandle'}; 136 my $filename = &util::filename_cat($base_dir, $file); 123 124 # can we process this file?? 125 my ($filename_full_path, $filename_no_path) = &util::get_full_filenames($base_dir, $file); 126 return undef unless $self->can_process_this_file($filename_full_path); 127 128 my $outhandle = $self->{'outhandle'}; 129 my $filename = &util::filename_cat($base_dir, $file); 137 130 138 131 my $plugin_name = ref ($self); … … 181 174 182 175 $self->{'split_segments'}->{$file} = \@segments; 183 $split_matched = scalar(@segments); 184 } 185 186 return $split_matched; 176 177 return scalar(@segments); 187 178 } 188 179 … … 263 254 # do plugin specific processing of doc_obj 264 255 print $outhandle "segment $segment\n" if ($self->{'verbosity'}); 256 print STDERR "<Processing s='$segment' n='$file' p='$self->{'plugin_type'}'>\n" if ($gli); 265 257 $status = $self->process (\$segtext, $pluginfo, $base_dir, $file, $metadata, $doc_obj, $gli); 266 258 if (!defined $status) { 267 print $outhandle "WARNING -no plugin could process segment $segment of $file\n"259 print $outhandle "WARNING: no plugin could process segment $segment of $file\n" 268 260 if ($verbosity >= 2); 261 print STDERR "<ProcessingError s='$segment' n='$file'>\n" if $gli; 269 262 next; 270 263 }
Note:
See TracChangeset
for help on using the changeset viewer.