Changeset 9494 for trunk/gsdl
- Timestamp:
- 2005-03-23T16:03:20+12:00 (19 years ago)
- Location:
- trunk/gsdl/perllib/plugins
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugins/MARCPlug.pm
r9493 r9494 189 189 my ($filename, $encoding, $language, $textref) = @_; 190 190 191 $self->{'readfile_encoding'} = $encoding;191 $self->{'readfile_encoding'}->{$filename} = $encoding; 192 192 193 193 my @marc_entries = (); … … 218 218 my $self = shift (@_); 219 219 my ($textref, $pluginfo, $base_dir, $file, $metadata, $doc_obj, $gli) = @_; 220 220 221 my $outhandle = $self->{'outhandle'}; 222 my $filename = &util::filename_cat($base_dir, $file); 221 223 222 224 if (! defined($self->{'mm_file'})) … … 235 237 $doc_obj->add_metadata($cursection, "FileFormat", "MARC"); 236 238 237 my $filename = &util::filename_cat($base_dir, $file);238 239 my $marc_entries = $self->{'marc_entries'}->{$filename}; 239 240 my $marc = shift(@$marc_entries); 240 241 241 $self->extract_metadata ($marc, $metadata, $doc_obj, $cursection); 242 my $encoding = $self->{'readfile_encoding'}->{$filename}; 243 $self->extract_metadata ($marc, $metadata, $encoding, $doc_obj, $cursection); 242 244 243 245 # add spaces after the sub-field markers, for word boundaries … … 248 250 $$textref =~ s/>/>/g; 249 251 250 my $encoding = $self->{'readfile_encoding'};251 252 $$textref = $self->to_utf8($encoding,$$textref); 252 253 … … 296 297 { 297 298 my $self = shift (@_); 298 my ($marc, $metadata, $ doc_obj, $section) = @_;299 my ($marc, $metadata, $encoding, $doc_obj, $section) = @_; 299 300 my $outhandle = $self->{'outhandle'}; 300 301 my $encoding = $self->{'readfile_encoding'};302 301 303 302 my $metadata_mapping = $self->{'metadata_mapping'}; -
trunk/gsdl/perllib/plugins/ProCitePlug.pm
r8121 r9494 91 91 92 92 93 my %workform_definitions;94 93 my %crazy_workform_mapping = 95 94 ( "A", "Book, Long Form", … … 120 119 my ($filename, $encoding, $language, $textref) = @_; 121 120 122 # Reset the workform definitions from previous files123 %workform_definitions = ();121 # Store the workform definitions for this file 122 my %workform_definitions = (); 124 123 125 124 # Read the contents of the file into $textref … … 151 150 $workform_definitions{$workform_name} = \@workform_values; 152 151 } 152 153 $self->{'workform_definitions'}->{$filename} = \%workform_definitions; 153 154 } 154 155 … … 160 161 161 162 my $outhandle = $self->{'outhandle'}; 163 my $filename = &util::filename_cat($base_dir, $file); 162 164 163 165 # Report that we're processing the file … … 180 182 181 183 # Check we know about the workform of this record 184 my %workform_definitions = %{$self->{'workform_definitions'}->{$filename}}; 182 185 if (!$workform_definitions{$workform_indicator}) { 183 186 print STDERR "Unknown workform!\n";
Note:
See TracChangeset
for help on using the changeset viewer.