Changeset 16386 for gsdl/trunk/perllib/plugins/MetadataCSVPlugin.pm
- Timestamp:
- 2008-07-14T14:43:50+12:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/plugins/MetadataCSVPlugin.pm
r15872 r16386 37 37 38 38 39 my $arguments = 40 [ { 'name' => "block_exp",41 'desc' => "{BasePlugin. block_exp}",39 my $arguments = [ 40 { 'name' => "process_exp", 41 'desc' => "{BasePlugin.process_exp}", 42 42 'type' => "regexp", 43 43 'reqd' => "no", 44 'deft' => &get_default_block_exp() } ]; 44 'deft' => &get_default_process_exp() } 45 46 ]; 45 47 46 48 … … 67 69 68 70 69 # Not used, just here to prevent a warning70 71 sub get_default_process_exp 71 72 { … … 73 74 } 74 75 75 76 # Used by BasePlugin read to block this file77 sub get_default_block_exp78 {79 return q^(?i)\.csv$^;80 }81 82 83 76 sub metadata_read 84 77 { 85 78 my $self = shift (@_); 86 my ($pluginfo, $base_dir, $file, $ metadata, $extrametakeys, $extrametadata, $processor, $maxdocs, $gli) = @_;79 my ($pluginfo, $base_dir, $file, $block_hash, $metadata, $extrametakeys, $extrametadata, $processor, $maxdocs, $gli) = @_; 87 80 88 81 # Read metadata from CSV files … … 93 86 print STDERR "\n<Processing n='$file' p='MetadataCSVPlugin'>\n" if ($gli); 94 87 print STDERR "MetadataCSVPlugin: processing $file\n" if ($self->{'verbosity'}) > 1; 88 89 # add the file to the block list so that it won't be processed in read, as we will do all we can with it here 90 $block_hash->{'file_blocks'}->{$filename} = 1; 95 91 96 92 # Read the CSV file to get the metadata
Note:
See TracChangeset
for help on using the changeset viewer.