- Timestamp:
- 2009-10-05T14:14:20+13:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/plugins/MetadataCSVPlugin.pm
r20000 r20771 74 74 { 75 75 return q^(?i)\.csv$^; 76 } 77 78 sub file_block_read { 79 my $self = shift (@_); 80 my ($pluginfo, $base_dir, $file, $block_hash, $metadata, $gli) = @_; 81 82 my ($filename_full_path, $filename_no_path) = &util::get_full_filenames($base_dir, $file); 83 84 if (!-f $filename_full_path || !$self->can_process_this_file($filename_full_path)) { 85 return undef; # can't recognise 86 } 87 88 # set this so we know this is a metadata file - needed for incremental 89 # build 90 # if this file changes, then we need to reimport everything 91 $block_hash->{'metadata_files'}->{$filename_full_path} = 1; 92 93 return 1; 76 94 } 77 95 … … 175 193 $extrametadata->{$csv_line_filename} = \%csv_line_metadata; 176 194 push(@$extrametakeys, $csv_line_filename); 195 # record which file the metadata came from 196 if (!defined $extrametafile->{$csv_line_filename}) { 197 $extrametafile->{$csv_line_filename} = {}; 198 } 199 # maps the file to full path 200 $extrametafile->{$csv_line_filename}->{$file} = $filename; 177 201 } 178 202 }
Note:
See TracChangeset
for help on using the changeset viewer.