/[webpac2]/trunk/conf/normalize/ff-libri.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/conf/normalize/ff-libri.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1094 by dpavlin, Tue Feb 12 18:32:13 2008 UTC revision 1095 by dpavlin, Fri Aug 1 23:41:47 2008 UTC
# Line 1  Line 1 
1  ##########################################################################  
2  ##                                                                      ##  # Ova datoteka sadrži pravila za generiranje MARC21 ISO 2709 izlazne
3  ## Ova datoteka sadrži pravila za generiranje MARC21 ISO 2709 izlazne   ##  # datoteke. Ulazni format je CDS/ISIS izvorni format, sa zapisima u
4  ## datoteke. Ulazni format je CDS/ISIS izvorni format, sa zapisima u    ##  # UNIMARC formatu, sa višestrukim odstupanjima od standarda.
5  ## UNIMARC formatu, sa višestrukim odstupanjima od standarda.           ##  
 ##                                                                      ##        
 ##########################################################################  
6    
7  ## konvertira se ako postoji polje 200^a  ## konvertira se ako postoji polje 200^a
8    
# Line 15  if ( rec('200','a') ) { Line 13  if ( rec('200','a') ) {
13  ## LDR 05 - c = pregledan ; n = new  ## LDR 05 - c = pregledan ; n = new
14  ## 999^aP - SFM  ## 999^aP - SFM
15    
16  if ( rec('999') && rec('999','a') =~ m/(pregledan|P)/i) {  if ( rec('999','a') && rec('999','a') =~ m/(pregledan|P)/i) {
17          marc_leader('05','c');          marc_leader('05','c');
18  } else {  } else {
19          marc_leader('05','n');          marc_leader('05','n');
# Line 29  if ( rec('999') && rec('999','a') =~ m/( Line 27  if ( rec('999') && rec('999','a') =~ m/(
27    
28          marc_leader('07','m');          marc_leader('07','m');
29    
30  ## LDR 17  ## LDR 17 - 3
31          marc_leader('17','7');          marc_leader('17','7');
32    
33  ## LDR 18  ## LDR 18
34          marc_leader('18','i');          marc_leader('18','i');
35    
36  ## LDR 19 - razjasniti  ## LDR 19 - razjasniti
37    # nema više r, ima #, a, b ili c
38    
39  if ( rec('230') ) {  if ( rec('230') | rec('231') | rec('232') | rec('233') ) {
40          marc_leader('19','r');          marc_leader('19','a');
41  }  }
42    
 ### 001 - Voyager ID  
   
 ### 003 - razjasniti  
   
 ### 007 - razjasniti  
   
 marc_fixed('007',00,'ta');  
   
43  ### 008 - All materials  ### 008 - All materials
44  ## dodati sve moguce slucajeve za datum, popuniti ono sto nedostaje  ## dodati sve moguce slucajeve za datum, popuniti ono sto nedostaje
45    ## ostaviti prazno tamo gdje nema ništa
46    
47  if ( rec('994','c') ) {  if ( rec('994','c') =~ m/\d{8}/ ) {
48          marc_fixed('008','00',          marc_fixed('008','00',
49                  regex('s/^\d\d//',                  regex('s/^\d\d//',
50                          rec('994','c')                          rec('994','c')
51                  ),                  ),
52          );          );
53  } else {  } elsif ( rec('994','c') =~ m/\d{6}/ ) {
54            marc_fixed('008', 00,
55                    regex('s/^\d\d//',
56                            rec('994','c')
57                    ),
58            );
59            marc_fixed('008', '04',
60                    '01'
61            );
62    } elsif ( rec('994','c') =~ m/\d{4}/ ) {
63          marc_fixed('008', 00,          marc_fixed('008', 00,
64                  '000000'                  regex('s/^\d\d//',
65                            rec('994','c')
66                    ),
67            );
68            marc_fixed('008', '02',
69                    '0101'
70          );          );
71  }  }
72    
# Line 74  if ( rec('994','c') ) { Line 80  if ( rec('994','c') ) {
80  ## 008 06 - Type of date/Publication status  ## 008 06 - Type of date/Publication status
81  ## dodati i ostale mogućnosti  ## dodati i ostale mogućnosti
82  ## 008 07-10 - Date 1 - iz 210d koji kroz modify postaje 210c  ## 008 07-10 - Date 1 - iz 210d koji kroz modify postaje 210c
83    ## srediti sve moguće upitne godine
 my $year = rec('210','c');  
84    
85  if ( rec('210','c') ) {  if ( rec('210','c') ) {
86          marc_fixed('008','06','s');             # 06 - Type of date/Publication status, s = single know date          my $d1;
87                    my $d2;
88  #       warn "## year = $year";          if ( rec('210','c') =~ m/\?/ ) {
89                    marc_fixed('008','06','q');
90            } else {
91                    marc_fixed('008','06','s');
92            }
93            if ( rec('210','c') =~ m/(\d{4})/ ) {
94                    $d1 = $1;
95            } else {
96                    $d1 = '';
97            }
98            if ( rec('210','c') =~ m/^.*-(\d{4})/ ) {
99                    $d2 = $1;
100            } else {
101                    $d2 = '',
102            }
103            if ( rec('210','c') =~ m/(\d{2})--/ ) {
104                    $d1 = $1.'uu';
105                    marc_fixed('008','06','u');
106            }
107    
108          if ( $year =~ m/^(\d{4})/ ) {          marc_fixed('008','07',$d1);             # 07-10 - Date 1
109  #       warn "## $1 ##\n";          marc_fixed('008','11',$d2);             # 07-10 - Date 1
                 marc_fixed('008','07',$1);              # 07-10 - Date 1  
110    
111  } else {  } else {
112          marc_fixed('008','06','n');             # 06 - n = unknown date          marc_fixed('008','06','n');             # 06 - n = unknown date
113          marc_fixed('008','07','uuuu');          marc_fixed('008','07','uuuu');
114  }  }
 }  
115    
116    
117  ## 008 11-14 - Date 2  ## 008 11-14 - Date 2
# Line 98  if ( rec('210','c') ) { Line 119  if ( rec('210','c') ) {
119  ## 008 15-17 - Place of publication, production, or execution - što ako nema 102?  ## 008 15-17 - Place of publication, production, or execution - što ako nema 102?
120  ## raspraviti  ## raspraviti
121    
122    marc_fixed('008','15','xx');
123    
124  #marc_fixed('008','15',  #marc_fixed('008','15',
125  #       lc ( rec('102') )  #       lc ( rec('102') )
126  #);  #);
127    
128  my $zemlja =  #my $zemlja =
129          lookup(  #       lookup(
130                  sub { rec('B') },  #               sub { rec('B') },
131                  'kodovi','zemlje',  #               'kodovi','zemlje',
132                  sub { rec('A') },  #               sub { rec('A') },
133                  sub {  #               sub {
134                          regex('s/[\s;:]/g',  #                       regex('s/[\s;:]/g',
135                                  rec('210','a')  #                               rec('210','a')
136                          )  #                       )
137                  },  #               },
138          );  #       );
   
 warn (  
         dump ($zemlja)  
 );  
   
 if ( $year =~ m/^(\d{4})/ ) {  
         if ( $1 >= 1990 ) {  
                 marc_fixed('008','15',  
                         lc ( $zemlja )  
   
                 );  
 #       } elsif ( dump( $zemlja ) eq 'hr' ) {  
 #               marc_fixed('008','15','yu');  
         }  
 }  
139    
140    
141  ## 008 35-37 - Language  ## 008 35-37 - Language
   
142  marc_fixed('008','35',  marc_fixed('008','35',
143          # first( lc(rec('101')) )                        # first( lc(rec('101')) )              
144          lc( frec('101'))                          lc( frec('101'))                
145  );  );
146                                                                                    
147  ## 008 38 - Modified record - razjasniti  ## 008 38 - Modified record - razjasniti
148    marc_fixed('008','38','|');            
149    
150  ## 008 39 - Cataloging source - d (other)  ## 008 39 - Cataloging source - d (other)
   
151  marc_fixed('008','39','d');              marc_fixed('008','39','d');            
152    
153  ### 008 - Books - raspraviti upotrebu ovih polja  ### 008 - Books - raspraviti upotrebu ovih polja
154  ## 008 18-21 - Illustrations  ## 008 18-21 - Illustrations
155    if ( rec('215','c') && rec('215','c') =~ m/ilustr/ ) {
156            marc_fixed('008','18','a')
157    }
158    
159  ## 008 22 - Target audience  ## 008 22 - Target audience
160    marc_fixed('008','22','|');
161    
162  ## 008 23 - Form of item  ## 008 23 - Form of item
163    
164  ## 008 24-27 - Nature of contents  ## 008 24-27 - Nature of contents
165    marc_fixed('008','24','||||');
166    
167  ## 008 28 - Government publication  ## 008 28 - Government publication
168    marc_fixed('008','28','|');
169    
170  ## 008 29 - Conference publication  ## 008 29 - Conference publication
171    marc_fixed('008','29','|');
172    
173  ## 008 30 - Festschrift  ## 008 30 - Festschrift
174    marc_fixed('008','30','|');
175    
176  ## 008 31 - Index  ## 008 31 - Index
177    marc_fixed('008','31','|');
178    
179  ## 008 32 - Undefined  ## 008 32 - Undefined
180  ## 008 33 - Literary form  ## 008 33 - Literary form
181    marc_fixed('008','33','|');
182    
183  ## 008 34 - Biography  ## 008 34 - Biography
184    marc_fixed('008','34','|');
185    
186  ### 020  ### 020
187  ## modify za polje 10 -> drugi ISBN počinje prefixom "ISBN" koji se miče (pr. u sfb)  ## modify za polje 10 -> drugi ISBN počinje prefixom "ISBN" koji se miče (pr. u sfb)
188    
189  if ( frec('10') ne ( frec('290') ) ) {  if ( frec('10') ne ( frec('290') ) ) {
190          marc('020','a',          if ( rec('10','a') !~ /pogre/ ) {
191                  # isbn_13(                  marc('020','a',
192                            # isbn_13(
193                                    regex('s/\s\s/ /g',
194                                    # regex('s/\(\d\)\(/$1 \(//g',
195                                            rec('10','a')
196                                    )
197                            # )
198                    );
199            }
200            if ( rec('10','a') =~ /pogre/ ) {
201                    marc('020','z',
202                          regex('s/\s\s/ /g',                          regex('s/\s\s/ /g',
                         # regex('s/\(\d\)\(/$1 \(//g',  
203                                  rec('10','a')                                  rec('10','a')
204                          )                          )
205                  # )                  );
206          );          }
207            marc('020','z',
208                    rec('10','z')
209            );
210                            
211  }  }
212    
213  #warn(  #warn(
# Line 181  if ( frec('10') ne ( frec('290') ) ) { Line 221  if ( frec('10') ne ( frec('290') ) ) {
221  ## marc 035a - System Number - Voyagerov ID (001)  ## marc 035a - System Number - Voyagerov ID (001)
222  ## polje 035$9 može sadržavati slova i razmake  ## polje 035$9 može sadržavati slova i razmake
223    
224  marc('035','6',  marc('035','a',
225  join_with('',  join_with('',
226          # config('input normalize path'),          # config('input normalize path'),
227          # config('name'),          # config('name'),
228            'HR-ZaFF ',
229          config(),          config(),
230          ' L',          'L-',
231          # config('input name'),          # config('input name'),
232          # id(),          # id(),
233          # rec('994','a'),          # rec('994','a'),
# Line 196  join_with('', Line 237  join_with('',
237    
238  ### 040  ### 040
239  ## za sve je isti  ## za sve je isti
 ## treba utvrditi točnu oznaku za ustanovu  
240    
241  marc('040','a',  marc('040','a',
242          'HR-ZgFF'          'HR-ZaFF'
243  );  );
244    
245  marc('040','b',  marc('040','b',
# Line 207  marc('040','b', Line 247  marc('040','b',
247  );  );
248    
249  marc('040','c',  marc('040','c',
250          'HR-ZgFF'          'HR-ZaFF'
251  );  );
252    
253  marc('040','e',  marc('040','e',
# Line 297  marc('100','a', Line 337  marc('100','a',
337          )          )
338  );  );
339    
340    ### formalna odrednica - iz 503 u 110, i1=0, i2=1
341    
342  ### 111 i 110  ### 111 i 110
343  ## konverzija u 110 ili 111 ovisno o postojanju/nepostojanju nekih polja - provjeriti ispise naslova iz svake baze - moguće su greške.  ## konverzija u 110 ili 111 ovisno o postojanju/nepostojanju nekih polja - provjeriti ispise naslova iz svake baze - moguće su greške.
# Line 371  if ( rec('700') || rec('710') ) { Line 412  if ( rec('700') || rec('710') ) {
412                    
413  marc_indicators('245', $i1, 0);  marc_indicators('245', $i1, 0);
414    
415  if      ( rec('200','a') =~ m/^Einen / ) {  if ( rec('200','a') =~ m/^Einen / ) {
416                  marc_indicators('245', $i1, 6);                  marc_indicators('245', $i1, 6);
417  }  }
418    
419  if      ( rec('200','a') =~ m/^Eine / ) {  if ( rec('200','a') =~ m/^Eine / ) {
420                  marc_indicators('245', $i1, 5);                  marc_indicators('245', $i1, 5);
421  }  }
422    
423  if      ( rec('200','a') =~ m/^(Die|Das|Der|Ein|Les|The) / ) {  if ( rec('200','a') =~ m/^(Die|Das|Der|Ein|Les|The) / ) {
424                  marc_indicators('245', $i1, 4);                  marc_indicators('245', $i1, 4);
425  }  }
426    
# Line 387  if ( rec('200','a') =~ m/^(Um|Un|An|La|L Line 428  if ( rec('200','a') =~ m/^(Um|Un|An|La|L
428                  marc_indicators('245', $i1, 3);                  marc_indicators('245', $i1, 3);
429  }  }
430    
431  if ( rec('200','a') =~ m/^(A|L') / ) {  if ( rec('200','a') =~ m/^(A|L) / ) {
432                    marc_indicators('245', $i1, 2);
433    }
434    
435    if ( rec('200','a') =~ m/^L'/ ) {
436                  marc_indicators('245', $i1, 2);                  marc_indicators('245', $i1, 2);
437  }  }
438    
439    
440  ### 245  ### 245
441  ## potpolja i interpunkcije pripremljeni u modify  ## potpolja i interpunkcije pripremljeni u modify
442    ## da li treba makivati razmake u inicijalima?
443    
444  #_debug(3);  #_debug(3);
445    
# Line 445  marc_compose('245', Line 491  marc_compose('245',
491  #_debug(0);  #_debug(0);
492    
493  ### 246  ### 246
494    ## i1=1 ukoliko pravilo nalaze napomenu, ali napomenu necemo pisati ponovo u 500
495    ## i1=3 ako pravlo na nalze napomenu
496    ## vidi na wiki
497    ## i2 - pogledati za svaku bazu sto su ti naslovi, pa onda oderditi indikatoda oderditi indikatoree
498    
499  marc_indicators('246', 1, 3);  marc_indicators('246', 3, ' ');
500  marc('246','a',  marc('246','a',
501          rec('532')          rec('532')
502  );  );
# Line 457  marc('246','a', Line 507  marc('246','a',
507  marc_compose('250',  marc_compose('250',
508          'a',suffix(          'a',suffix(
509                  rec('205','f') ? ' / ' :                  rec('205','f') ? ' / ' :
510                          ' ',                          '',
511                          rec('205','a')                          rec('205','a')
512          ),          ),
513          'b', rec('205','f'),          'b', rec('205','f'),
# Line 466  marc_compose('250', Line 516  marc_compose('250',
516  ### 260  ### 260
517  ## ponovljiva potpolja u originalnom redosljedu - priprema u modify  ## ponovljiva potpolja u originalnom redosljedu - priprema u modify
518    
519  marc_original_order('260', '210');          marc_original_order('260', '210');
520    
521    
522  ### 300  ### 300
# Line 494  marc('300','b', Line 544  marc('300','b',
544  marc('300','c',  marc('300','c',
545          suffix(          suffix(
546                  rec('215','e') ? ' + ' :                  rec('215','e') ? ' + ' :
547                          '',                          '.',
548                          rec('215','d')                          rec('215','d')
549          )          )
550  );  );
# Line 505  marc('300','e', Line 555  marc('300','e',
555    
556  ### 362 - brojčani podaci za nakladničku cjelinu - razjasniti upotrebu  ### 362 - brojčani podaci za nakladničku cjelinu - razjasniti upotrebu
557    
558    # if ( ! rec('225','z')  ) {
559    
560    # ako je naslov nakladničke cjeline složen, podatak se zapisuje u 490, s pripadajućim 830
561    
562    #if (  frec('225','a') =~ m/[\/=:]/  ) {
563    #
564    ##_debug(3);
565    #
566    #### 490
567    ### 490: Subfield _p is not allowed.
568    #
569    #marc_indicators('490','0',' ');
570    #
571    #marc_template(
572    #       from => 225, to => 490,
573    #       subfields_rename => [
574    #               'a' => 'a',
575    #               'x' => 'x',
576    #               'v' => 'v',
577    #               'h' => 'n',
578    #               'i' => 'p',
579    #               'w' => 'v',
580    #       ],
581    #       isis_template => [
582    #               'a',
583    #               'a ;|v',
584    #               'a,|x ;|v',
585    #               'a,|x ;|w',
586    #               'a,|x.|h ;|w',
587    #               'a.|h,|i ;|v',
588    #               'a ;|v.|i',
589    #               'a.|i ;|w',
590    #               'a,|x',
591    #               # greske:
592    #               'i ;|v',
593    #               'i'
594    #       ],
595    #);
596    
597    #marc_template(
598    #       from => 225, to => 490,
599    #         from => "{ z => 1 }",
600    #           to => "{ a => 1 }",
601    #
602    #       marc_template => [
603    #               'a',
604    #       ],
605    #);
606    
607    # marc_indicators('830',' ','0');
608    # i2 ovisi članu - popraviti
609    #
610    # marc('830','a',
611    #       regex('s/(^.*)\s\/\s(.*)/$1 ($2)/g',
612    #               rec('225','a')
613    #       )
614    # );
615    
616    
617    #} else {
618    
619    
620  ### 440 - indikatori  ### 440 - indikatori
621  ## 2.ind. prema jeziku i članu, provjeriti  ## 2.ind. prema jeziku i članu, provjeriti
622    
623  marc_indicators('440', ' ', '0');  marc_indicators('440', ' ', '0');
624    
625  if (    ( rec('225','a') =~ m/^Die /) ||  if ( rec('200','a') =~ m/^Einen / ) {
626          ( rec('225','a') =~ m/^Das /) ||                  marc_indicators('440', ' ', 6);
         ( rec('225','a') =~ m/^The /) ) {  
                 marc_indicators('440', ' ', 4);  
627  }  }
628    
629  if (    ( rec('225','a') =~ m/^A /) && ( rec(101) =~ m/ENG/ ) ) {  if ( rec('200','a') =~ m/^Eine / ) {
630                  marc_indicators('440', ' ', 2);                  marc_indicators('440', ' ', 5);
631    }
632    
633    if ( rec('200','a') =~ m/^(Die|Das|Der|Ein|Les|The) / ) {
634                    marc_indicators('440', ' ', 4);
635  }  }
636    
637  if (    ( rec('225','a') =~ m/^An /) && ( rec(101) =~ m/ENG/ ) ) {  if ( rec('200','a') =~ m/^(Um|Un|An|La|Le|Il) / ) {
638                  marc_indicators('440', ' ', 3);                  marc_indicators('440', ' ', 3);
639  }  }
640    
641  #_debug(3);  if ( rec('200','a') =~ m/^(A|L') / ) {
642                    marc_indicators('440', ' ', 2);
643    }
644    
645    ## 440v nije ponovljivo
646    
 ### 440  
647    
648  marc_template(  marc_template(
649          from => 225, to => 440,          from => 225, to => 440,
# Line 539  marc_template( Line 656  marc_template(
656                  'w' => 'v',                  'w' => 'v',
657          ],          ],
658          isis_template => [          isis_template => [
659                  'a.|h,|i ;|w',                  'a',
660                  'a.|h.|w',                  'a,|x',
661                  'a.|i ;|w',                  'a,|x ;|v',
662                    'a,|x.|i',
663                    'a,|x.|i ;|w',
664                    'a,|x.|h ;|w',
665                    'a,|x.|h,|i ;|w',
666                    'a,|x ;|v.|h ;|w',
667                    'a,|x ;|v.|h,|i ;|w',
668                    'a ;|v',
669                  'a ;|v.|i',                  'a ;|v.|i',
670                    'a ;|v.|h,|i',
671                    'a ;|w',
672                  'a ;|v.|i ;|w',                  'a ;|v.|i ;|w',
673                  'a ;|v.|h,|i ;|w',                  'a ;|v.|h,|i ;|w',
674                  'a ;|v.|h ;|w',                  'a ;|v.|h ;|w',
675                    'a.|h,|i',
676                    'a.|h,|i ;|w',
677                    'a.|i',
678                    'a.|i ;|w',
679                    # greške
680                  'a ;|v ;|w',                  'a ;|v ;|w',
681                  #mozda greska:                  'a.|h',
682                  'a ;|v,|x ;|w',                  'a.|h ;|w',
683                  'a ;|v,|x.|p',                  'a.|h ;|v',
684                  'a,|x ;|v',                  'h,|i',
685                  'a,|x.|p ;|w',                  'h ;|v',
686          ],                  'i ;|w',
687            from => "{ a => 1, i => 1, w => 1, \"x\" => 1 }",                  'v',    
688              to => "{ a => 1, p => 1, v => 1, \"x\" => 1 }",                  'w',
689    
         marc_template => [  
                 'a',  
                 'a ;|v',  
                 'a,|x',  
                 'a.|n',         # mozda greska  
                 'a.|n,|p',  
                 'a.|p',  
                 'a ;|v.|n',  
                 'a ;|v.|n,|p',  # mozda greska  
                 'n,|p',  
                 'n ;|v',        # mozda greska  
                 'p ;|v',  
                 'v',  
                 'x',  
                 'x ;|v'         # greska  
690          ],          ],
691  );  );
692    
693    #}
694    
695    #marc_template(
696    #       from => 225, to => 490,
697    #       subfields_rename => [
698    #               'a' => 'a',
699    #               'x' => 'x',
700    #               'v' => 'v',
701    #               'h' => 'n',
702    #               'i' => 'p',
703    #               'w' => 'v',
704    #       ],
705    #       isis_template => [
706    #               'a.|h,|i ;|w',
707    #               'a.|h.|w',
708    #               'a.|i ;|w',
709    #               'a ;|v.|i',
710    #               'a ;|v.|i ;|w',
711    #               'a ;|v.|h,|i ;|w',
712    #               'a ;|v.|h ;|w',
713    #               'a ;|v ;|w',
714    #               #mozda greska:
715    #               'a ;|v,|x ;|w',
716    #               'a ;|v,|x.|p',
717    #               'a,|x ;|v',
718    #               'a,|x.|p ;|w',
719    #       ],
720    #         from => "{ a => 1, i => 1, w => 1, \"x\" => 1 }",
721    #           to => "{ a => 1, p => 1, v => 1, \"x\" => 1 }",
722    #
723    #       marc_template => [
724    #               'a',
725    #               'a ;|v',
726    #               'a,|x',
727    #               'a.|n',         # mozda greska
728    #               'a.|n,|p',
729    #               'a.|p',
730    #               'a ;|v.|n',
731    #               'a ;|v.|n,|p',  # mozda greska
732    #               'n,|p',
733    #               'n ;|v',        # mozda greska
734    #               'p ;|v',
735    #               'v',
736    #               'x',
737    #               'x ;|v'         # greska
738    #       ],
739    #);
740    
741    
742  ## marc_compose za 440 radi samo kad polje ni potpolja nisu ponovljiva. ne zapisuje dobro drugo pojavljivanje ^v, tj. ^v iza ^p (iz 225^w)  ## marc_compose za 440 radi samo kad polje ni potpolja nisu ponovljiva. ne zapisuje dobro drugo pojavljivanje ^v, tj. ^v iza ^p (iz 225^w)
743    
# Line 663  marc('504','a', Line 827  marc('504','a',
827  ## u LOC konv. tablici stoji 327 (NP) u 505 (NR)  ## u LOC konv. tablici stoji 327 (NP) u 505 (NR)
828  ## standard i validacije dopuštaju 501 (R) i 505 (R)  ## standard i validacije dopuštaju 501 (R) i 505 (R)
829    
830  if ( config() =~ m/ffps/ || config() =~ m/fftu/ ) {  if ( config() =~ m/ffps|fftu/ ) {
831          marc_indicators('505', '0', ' ');          marc_indicators('505', '0', ' ');
832          marc('505','a',          marc('505','a',
833                  regex('s/\s*[\\r\\n]+\s*\**\s*/ ; /g',                  regex('s/\s*[\\r\\n]+\s*\**\s*/ ; /g',
# Line 719  marc('655','a', Line 883  marc('655','a',
883  );  );
884    
885  ### 653  ### 653
886    ## da li ponovljivo polje ili potpolje, pogledati u Koha tags
887    
888  marc_indicators('653', 0, ' ');  marc_indicators('653', ' ', ' ');
889  marc('653','a',  marc('653','a',
890          rec('610')          rec('610')
891  );  );
# Line 733  marc('653','a', Line 898  marc('653','a',
898    
899  marc_indicators('700', 1, ' ');  marc_indicators('700', 1, ' ');
900    
 if ( rec('701') ) {  
 marc('700','4',  
         'aut'  
 );  
 }  
   
901  marc('700','a',  marc('700','a',
902          join_with(', ',          rec('701', 'a'),
                 rec('701', 'a'),  
                 rec('701', 'b')  
         )  
903  );  );
904    
905  marc('700','a',  marc('700','a',
# Line 769  marc('700','a', Line 925  marc('700','a',
925    
926    
927  marc('700','a',  marc('700','a',
         join_with(', ',  
928                  rec('702', 'a'),                  rec('702', 'a'),
                 rec('702', 'b')  
         )  
929  );  );
930    
931  marc('700','a',  marc('700','a',
# Line 827  marc('740','a', Line 980  marc('740','a',
980  #if (  #if (
981  #       rec('225','a')  # da li je nakladnička cjelina?  #       rec('225','a')  # da li je nakladnička cjelina?
982  #) {  #) {
983  #  
984  #my $series_key =  #my $series_key =
985  #join_with('',  #join_with('',
986  #       rec('225','a'),  #       rec('225','a'),
# Line 862  marc('740','a', Line 1015  marc('740','a',
1015  #  #
1016  #       marc_indicators('760', 0, ' ');  #       marc_indicators('760', 0, ' ');
1017  #        #      
1018    #       marc('760','t',
1019    #               rec('225','a')
1020    #       );
1021  #       marc('760','w',  #       marc('760','w',
1022  #               get( $series_key )  #               get( $series_key )
1023  #       );  #       );
# Line 888  marc('740','a', Line 1044  marc('740','a',
1044  #  #
1045    
1046    
1047  ### 852 - signatura  ### 774 - Constituent Item Entry
1048    ### 787 - Nonspecific Relationship Entry
1049    
1050  marc_indicators('852', 4, ' ');  marc_indicators('787','0',' ');
1051    
1052  marc('852','j',  marc_compose('787',
1053          join_with(' ',          'g', rec('230','v'),
1054                  rec('990')          't', rec('230','a'),
1055          )          'b', rec('240','a'),
1056            'd', rec('250','a'),
1057            'd', rec('250','d'),
1058            'h', rec('260','a'),
1059            'k', rec('270','a'),
1060            'n', join_with('. - ',
1061                    rec('280'),
1062            ),
1063            'x', rec('290'),
1064    );
1065    
1066    marc_compose('787',
1067            'g', rec('231','v'),
1068            't', rec('231','a'),
1069            'b', rec('241','a'),
1070            'd', rec('251','a'),
1071            'd', rec('251','d'),
1072            'h', rec('261','a'),
1073            'k', rec('271','a'),
1074            'n', join_with('. - ',
1075                    rec('281'),
1076            ),
1077            'x', rec('291'),
1078    );
1079    
1080    marc_compose('787',
1081            'g', rec('232','v'),
1082            't', rec('232','a'),
1083            'b', rec('242','a'),
1084            'd', rec('252','a'),
1085            'd', rec('252','d'),
1086            'h', rec('262','a'),
1087            'k', rec('272','a'),
1088            'n', join_with('. - ',
1089                    rec('282'),
1090            ),
1091            'x', rec('292'),
1092    );
1093    
1094    marc_compose('787',
1095            'g', rec('233','v'),
1096            't', rec('233','a'),
1097            'b', rec('243','a'),
1098            'd', rec('253','a'),
1099            'h', rec('263','a'),
1100            'k', rec('273','a'),
1101            'n', join_with('. - ',
1102                    rec('283'),
1103            ),
1104            'x', rec('293'),
1105  );  );
1106    
1107    
1108    
1109    ### 852 - lokacija
1110    
1111    
1112    
1113    #marc('852','i',
1114    #      
1115    #);
1116    
1117            
1118    
1119  ### 876 - item information - basic bibliographic unit  ### 876 - item information - basic bibliographic unit
1120    
1121  marc('876','a',  marc('876','a',
1122          rec('991'),          rec('991','t'),
1123  );  );
1124    
1125  ### 886 - former marc  ### 886 - former marc
# Line 930  marc('886','b', Line 1148  marc('886','b',
1148          )          )
1149  );  );
1150    
1151    ### KOHA
1152    
1153    marc('942','b',
1154            'LIB'
1155    );
1156    
1157    marc('942','c',
1158            'KNJ'
1159    );
1160    
1161    marc('942','d',
1162            join_with(' | ',
1163                    rec('990')
1164            )
1165    );      
1166    
1167    if ( config() =~ m/ffiz/ ) {
1168            my $novasig1 =
1169                    lookup(
1170                            sub { rec('C') },
1171                            'ffiz','mapirano',
1172                            sub { rec('B') },
1173                            sub { rec('990') }
1174                    );
1175            my $novasig2 =
1176                    lookup(
1177                            sub { rec('C') . ' ' . rec('D') },
1178                            'ffiz','starasig',
1179                            sub { rec('A') },
1180                            sub { rec('000') },
1181                    );
1182            marc('942','h',
1183                    $novasig1
1184            );
1185            marc('942','i',
1186                    $novasig2
1187            );
1188    }
1189    
1190    
1191    #if ( config() =~ m/ffsf|ffpo/ ) {
1192    #       my $sig1 =
1193    #               lookup(
1194    #                       sub { rec('C') },
1195    #                       'ffiz','signature',
1196    #                       sub { rec('B') },
1197    #                       sub { frec('990') },
1198    #               );
1199    #       if ( rec('700','a') ) {
1200    #               marc('942','h',
1201    #                       $sig1,
1202    #               );
1203    #               if ( rec('200','a') =~ m/^(The|Die|Das|Der|Ein|Les) / ) {
1204    #                       marc('942','i',
1205    #                               join_with(' ',
1206    #                                       regex('s/(^.{3}).*/$1/',
1207    #                                               uc ( rec('700','a') )
1208    #                                       ),
1209    #                                       regex('s/^.{4}(.{1}).*/$1/',
1210    #                                               lc ( rec('200','a') )
1211    #                                       )
1212    #                               )
1213    #                       );
1214    #               } elsif ( rec('200','a') =~ m/^(Um|Un|An|La|Le|Il) / ) {
1215    #                       marc('942','i',
1216    #                               join_with(' ',
1217    #                                       regex('s/(^.{3}).*/$1/',
1218    #                                               uc ( rec('700','a') )
1219    #                                       ),
1220    #                                       regex('s/^.{3}(.{1}).*/$1/',
1221    #                                               lc ( rec('200','a') )
1222    #                                       )
1223    #                               )
1224    #                       );
1225    #               } elsif ( rec('200','a') =~ m/^Eine / ) {
1226    #                       marc('942','i',
1227    #                               join_with(' ',
1228    #                                       regex('s/(^.{3}).*/$1/',
1229    #                                               uc ( rec('700','a') )
1230    #                                       ),
1231    #                                       regex('s/^.{5}(.{1}).*/$1/',
1232    #                                               lc ( rec('200','a') )
1233    #                                       )
1234    #                               )
1235    #                       );
1236    #               } elsif ( rec('200','a') =~ m/^Einen / ) {
1237    #                       marc('942','i',
1238    #                               join_with(' ',
1239    #                                       regex('s/(^.{3}).*/$1/',
1240    #                                               uc ( rec('700','a') )
1241    #                                       ),
1242    #                                       regex('s/^.{6}(.{1}).*/$1/',
1243    #                                               lc ( rec('200','a') )
1244    #                                       )
1245    #                               )
1246    #                       );
1247    #               } elsif ( rec('200','a') =~ m/^(A|L) / ) {
1248    #                       marc('942','i',
1249    #                               join_with(' ',
1250    #                                       regex('s/(^.{3}).*/$1/',
1251    #                                               uc ( rec('700','a') )
1252    #                                       ),
1253    #                                       regex('s/^.{2}(.{1}).*/$1/',
1254    #                                               lc ( rec('200','a') )
1255    #                                       )
1256    #                               )
1257    #                       );
1258    #               } else {
1259    #                       marc('942','i',
1260    #                               join_with(' ',
1261    #                                       regex('s/(^.{3}).*/$1/',
1262    #                                               uc ( rec('700','a') )
1263    #                                       ),
1264    #                                       regex('s/(^.{1}).*/$1/',
1265    #                                               lc ( rec('200','a') )
1266    #                                       )
1267    #                               )
1268    #                       );
1269    #               }
1270    #       } elsif ( rec('710','a') ) {
1271    #               marc('942','h',
1272    #                       $sig1,
1273    #               );
1274    #               if ( rec('200','a') =~ m/^(The|Die|Das|Der|Ein|Les) / ) {
1275    #                       marc('942','i',
1276    #                               join_with(' ',
1277    #                                       regex('s/(^.{3}).*/$1/',
1278    #                                               uc ( rec('710','a') )
1279    #                                       ),
1280    #                                       regex('s/^.{4}(.{1}).*/$1/',
1281    #                                               lc ( rec('200','a') )
1282    #                                       )
1283    #                               )
1284    #                       );
1285    #               } elsif ( rec('200','a') =~ m/^(Um|Un|An|La|Le|Il) / ) {
1286    #                       marc('942','i',
1287    #                               join_with(' ',
1288    #                                       regex('s/(^.{3}).*/$1/',
1289    #                                               uc ( rec('710','a') )
1290    #                                       ),
1291    #                                       regex('s/^.{3}(.{1}).*/$1/',
1292    #                                               lc ( rec('200','a') )
1293    #                                       )
1294    #                               )
1295    #                       );
1296    #               } elsif ( rec('200','a') =~ m/^Eine / ) {
1297    #                       marc('942','i',
1298    #                               join_with(' ',
1299    #                                       regex('s/(^.{3}).*/$1/',
1300    #                                               uc ( rec('710','a') )
1301    #                                       ),
1302    #                                       regex('s/^.{5}(.{1}).*/$1/',
1303    #                                               lc ( rec('200','a') )
1304    #                                       )
1305    #                               )
1306    #                       );
1307    #               } elsif ( rec('200','a') =~ m/^Einen / ) {
1308    #                       marc('942','i',
1309    #                               join_with(' ',
1310    #                                       regex('s/(^.{3}).*/$1/',
1311    #                                               uc ( rec('710','a') )
1312    #                                       ),
1313    #                                       regex('s/^.{6}(.{1}).*/$1/',
1314    #                                               lc ( rec('200','a') )
1315    #                                       )
1316    #                               )
1317    #                       );
1318    #               } elsif ( rec('200','a') =~ m/^(A|L) / ) {
1319    #                       marc('942','i',
1320    #                               join_with(' ',
1321    #                                       regex('s/(^.{3}).*/$1/',
1322    #                                               uc ( rec('710','a') )
1323    #                                       ),
1324    #                                       regex('s/^.{2}(.{1}).*/$1/',
1325    #                                               lc ( rec('200','a') )
1326    #                                       )
1327    #                               )
1328    #                       );
1329    #               } else {
1330    #                       marc('942','i',
1331    #                               join_with(' ',
1332    #                                       regex('s/(^.{3}).*/$1/',
1333    #                                               uc ( rec('710','a') )
1334    #                                       ),
1335    #                                       regex('s/(^.{1}).*/$1/',
1336    #                                               lc ( rec('200','a') )
1337    #                                       )
1338    #                               )
1339    #                       );
1340    #               }
1341    #       } elsif ( rec('200','a') =~ m/^(The|Die|Das|Der|Ein|Les) / ) {
1342    #               marc('942','h',
1343    #                       $sig1,
1344    #               );
1345    #               marc('942','i',
1346    #                       regex('s/^.{4}(.{3}).*/$1/',
1347    #                               uc ( rec('200','a') )
1348    #                       ),
1349    #               );
1350    #                      
1351    #       } else {
1352    #               marc('942','h',
1353    #                       $sig1,
1354    #               );
1355    #               marc('942','i',
1356    #                       regex('s/(^\w{3}).*/$1/',
1357    #                               uc ( rec('200','a') )
1358    #                       )
1359    #               )
1360    #       }
1361    #} # if config()
1362    
1363    marc('952','8',
1364            rec('991','8')
1365    );
1366    
1367    marc('952','a',
1368            rec('991','a')
1369    );
1370    
1371    marc('952','b',
1372            rec('991','b')
1373    );
1374    
1375    marc('952','c',
1376            rec('991','c'),
1377    );
1378    
1379    marc('952','i',
1380            rec('991','i')
1381    );
1382    
1383    marc('952','y',
1384            rec('991','y')
1385    );
1386    
1387    
1388    
1389    
1390  } # polje 200a  } # polje 200a
1391    # } sig

Legend:
Removed from v.1094  
changed lines
  Added in v.1095

  ViewVC Help
Powered by ViewVC 1.1.26