--- trunk/conf/normalize/ff-peri.pl 2009/04/29 22:24:34 1181 +++ trunk/conf/normalize/ff-peri.pl 2009/05/18 17:37:06 1182 @@ -1,37 +1,39 @@ if ( rec('200','a') ) { ### LEADER -## raspraviti 17,18 -marc_leader('05','n'); # Record status -marc_leader('06','a'); # Type of record +## LDR 05 - n - new +marc_leader('05','n'); -## izvuci podatke iz tablice (za po i sf) +## LDR 06 - a - language material +marc_leader('06','a'); + +## LDR 07 - Bibliographic level +# izvuci podatke iz tablice (za po i sf) if ( rec('225','a') ) { marc_leader('07','d'); } else { - marc_leader('07','s'); # Bibliographic level + marc_leader('07','s'); } -marc_leader('18','i'); # Descriptive cataloging form +## LDR 17 - Encoding level ; 7 - minimal level, u - unknown +marc_leader('17','u'); + +## LDR 18 - i - isbd +marc_leader('18','i'); + -# ako postoji neko od polja 76x-78x - LDR 19 je r, ako ne postoji onda je prazno +## LDR 19 - Multipart resource record level ; # - Not specified or not applicable, a - Set, b - Part with independent title, c - Part with dependent title # tematski brojevi imaju vezu u if ( rec('225','a') ) { - marc_leader('19','r'); # Linked record requirement + marc_leader('19','a'); } -### 001 - Voyager - -### 007 -marc_fixed('007',00,'ta'); - ### 008 - All materials -# što zapisati u polje kad datum nije poznat? -marc_fixed('008','00', '070707'); # 00-05 - Date entered on file +marc_fixed('008','00', '010101'); # 00-05 - Date entered on file ## za 008 06 treba i lookup u tablicu gdje postoji podatak o tome jel tekuci casopis ili nije? ## c - Continuing resource currently published @@ -39,27 +41,57 @@ my $year = rec('210','c'); -if ( rec('210','c') ) { - marc_fixed('008','06','s'); # 06 - Type of date/Publication status, s = single know date - -# warn "## year = $year"; - - if ( $year =~ m/^(\d{4})/ ) { -# warn "## $1 ##\n"; - marc_fixed('008','07',$1); # 07-10 - Date 1 - } +#if ( rec('210','c') ) { +# marc_fixed('008','06','s'); # 06 - Type of date/Publication status, s = single know date +# +## warn "## year = $year"; +# +# if ( $year =~ m/^(\d{4})/ ) { +## warn "## $1 ##\n"; +# marc_fixed('008','07',$1); # 07-10 - Date 1 +# } +# +# if ( $year =~ m/^\d{4}-(\d{4})/ ) { +## warn "## $1 ##"; +# marc_fixed('008','11',$1); # 11-14 - Date 2 +# marc_fixed('008','06','d'); +# } +# +#} else { +# marc_fixed('008','06','n'); # 06 - n = unknown date +#} - if ( $year =~ m/^\d{4}-(\d{4})/ ) { -# warn "## $1 ##"; - marc_fixed('008','11',$1); # 11-14 - Date 2 - marc_fixed('008','06','d'); +if ( rec('210','c') ) { + my $d1 = ''; + my $d2 = ''; + if ( rec('210','c') =~ m/(\d{4})-/ ) { + marc_fixed('008','06','m'); + if ( rec('210','c') =~ m/(\d{4})-/ ) { + $d1 = $1; + $d2 = '9999'; + } + if ( rec('210','c') =~ m/-(\d{4})/ ) { + $d2 = $1; + } + } else { + marc_fixed('008','06','s'); + if ( rec('210','c') =~ m/(\d{4})/ ) { + $d1 = $1; + } + if ( rec('210','c') =~ m/(\d{2})(--|__)/ ) { + $d1 = $1.'uu'; + } + if ( rec('210','c') =~ m/(\d{3})(-|_)/ ) { + $d1 = $1.'u'; + } } - + marc_fixed('008','07',$d1); # 07-10 - Date 1 + marc_fixed('008','11',$d2); # 07-10 - Date 1 } else { marc_fixed('008','06','n'); # 06 - n = unknown date + marc_fixed('008','07','uuuu'); } - marc_fixed('008','15', # 15-17 - Place of publication, production, or execution lc ( rec('102') ) ); @@ -241,9 +273,9 @@ marc_compose('245', 'a', suffix( ( ! ( rec('200','d') || rec('200','e') || rec('200','k') ) ) && ( rec('200','f') ) ? ' /' : - ( rec('200','d') ) ? ' = ' : - ( rec('200','e') ) ? ' : ' : - ( rec('200','k') ) ? ' ; ' : + ( rec('200','d') ) ? ' =' : + ( rec('200','e') ) ? ' :' : + ( rec('200','k') ) ? ' ;' : '', rec('200','a'), ),