[Koha-cvs] CVS: koha/C4 SimpleMarc.pm,1.1.2.1,1.1.2.2

Alan Millar amillar at users.sourceforge.net
Wed Jun 26 17:52:57 CEST 2002


Update of /cvsroot/koha/koha/C4
In directory usw-pr-cvs1:/tmp/cvs-serv18824/C4

Modified Files:
      Tag: rel-1-2
	SimpleMarc.pm 
Log Message:
Fix display of marc tag labels and indicators

Index: SimpleMarc.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Attic/SimpleMarc.pm,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -r1.1.2.1 -r1.1.2.2
*** SimpleMarc.pm	26 Jun 2002 07:27:35 -0000	1.1.2.1
--- SimpleMarc.pm	26 Jun 2002 15:52:55 -0000	1.1.2.2
***************
*** 31,34 ****
--- 31,35 ----
  	&extractmarcfields 
  	&parsemarcfileformat 
+ 	&taglabel
  	%tagtext
  	%tagmap
***************
*** 76,79 ****
--- 77,81 ----
  
  my %tagtext = (
+     'LDR' => 'Leader',
      '001' => 'Control number',
      '003' => 'Control number identifier',
***************
*** 83,94 ****
      '008' => 'Fixed length data elements',
      '010' => 'LCCN',
!     '015' => 'LCCN Cdn',
      '020' => 'ISBN',
      '022' => 'ISSN',
      '037' => 'Source of acquisition',
      '040' => 'Cataloging source',
      '041' => 'Language code',
      '043' => 'Geographic area code',
      '050' => 'Library of Congress call number',
      '060' => 'National Library of Medicine call number',
      '082' => 'Dewey decimal call number',
--- 85,100 ----
      '008' => 'Fixed length data elements',
      '010' => 'LCCN',
!     '015' => 'National library CN',
      '020' => 'ISBN',
      '022' => 'ISSN',
+     '024' => 'Other standard ID',
+     '035' => 'System control number',
      '037' => 'Source of acquisition',
      '040' => 'Cataloging source',
      '041' => 'Language code',
      '043' => 'Geographic area code',
+     '043' => 'Publishing country code',
      '050' => 'Library of Congress call number',
+     '055' => 'Canadian classification number',
      '060' => 'National Library of Medicine call number',
      '082' => 'Dewey decimal call number',
***************
*** 353,359 ****
  
  	my $leader=substr($record,0,24);
! 	print "<tr><td>Leader:</td><td>$leader</td></tr>\n" if $debug;
  	push (@record, {
! 		'tag' => 'Leader',
  		'indicator' => $leader ,
  	} );
--- 359,365 ----
  
  	my $leader=substr($record,0,24);
! 	print "<pre>parse Leader:$leader</pre>\n" if $debug;
  	push (@record, {
! 		'tag' => 'LDR',
  		'indicator' => $leader ,
  	} );
***************
*** 365,368 ****
--- 371,375 ----
  	    my $indicator;
  	    unless ($directory) {
+ 		# If we didn't already find a directory, extract one.
  		$directory=$field;
  		my $itemcounter=1;
***************
*** 372,378 ****
--- 379,388 ----
  		my $start;
  		while ($item=substr($directory,0,12)) {
+ 		    # Pull out location of first field
  		    $tag=substr($directory,0,3);
  		    $length=substr($directory,3,4);
  		    $start=substr($directory,7,6);
+ 
+ 		    # Bump to next directory entry
  		    $directory=substr($directory,12);
  		    $tag{$counter2}=$tag;
***************
*** 388,391 ****
--- 398,402 ----
  	    $indicator=$subfields[0];
  	    $field{'indicator'}=$indicator;
+ 	    print "<pre>parse indicator:$indicator</pre>\n" if $debug;
  	    my $firstline=1;
  	    unless ($#subfields==0) {
***************
*** 428,433 ****
--- 439,455 ----
  } # sub parsemarcfileformat
  
+ #----------------------------------------------
+ sub taglabel {
+     my ($tag)=@_;
+ 
+     return $tagtext{$tag};
+ 
+ } # sub taglabel
+ 
  #---------------------------------------------
  # $Log$
+ # Revision 1.1.2.2  2002/06/26 15:52:55  amillar
+ # Fix display of marc tag labels and indicators
+ #
  # Revision 1.1.2.1  2002/06/26 07:27:35  amillar
  # Moved acqui.simple MARC handling to new module SimpleMarc.pm





More information about the Koha-cvs mailing list