/[webpac2]/trunk/conf/normalize/ff-peri.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-peri.pl

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

revision 1181 by dpavlin, Tue Feb 12 18:32:13 2008 UTC revision 1182 by mglavica, Mon May 18 17:37:06 2009 UTC
# Line 1  Line 1 
1  if ( rec('200','a') ) {  if ( rec('200','a') ) {
2    
3  ### LEADER  ### LEADER
 ## raspraviti 17,18  
4    
5  marc_leader('05','n');          # Record status  ## LDR 05 - n - new
6  marc_leader('06','a');          # Type of record  marc_leader('05','n');
7    
8  ## izvuci podatke iz tablice (za po i sf)  ## LDR 06 - a - language material
9    marc_leader('06','a');
10    
11    ## LDR 07 - Bibliographic level
12    #  izvuci podatke iz tablice (za po i sf)
13    
14  if ( rec('225','a') ) {  if ( rec('225','a') ) {
15          marc_leader('07','d');            marc_leader('07','d');  
16  } else {  } else {
17          marc_leader('07','s');  # Bibliographic level          marc_leader('07','s');  
18  }  }
19    
20  marc_leader('18','i');          # Descriptive cataloging form  ## LDR 17 - Encoding level ; 7 - minimal level, u - unknown
21    marc_leader('17','u');
22    
23    ## LDR 18 - i - isbd
24    marc_leader('18','i');
25    
26    
27  # 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
28  # tematski brojevi imaju vezu u  # tematski brojevi imaju vezu u
29    
30  if ( rec('225','a') ) {  if ( rec('225','a') ) {
31          marc_leader('19','r');  # Linked record requirement          marc_leader('19','a');
32  }  }
33    
 ### 001 - Voyager  
   
 ### 007  
 marc_fixed('007',00,'ta');  
   
34  ### 008 - All materials  ### 008 - All materials
 # što zapisati u polje kad datum nije poznat?  
35    
36  marc_fixed('008','00', '070707');       # 00-05 - Date entered on file  marc_fixed('008','00', '010101');       # 00-05 - Date entered on file
37    
38  ## za 008 06 treba i lookup u tablicu gdje postoji podatak o tome jel tekuci casopis ili nije?  ## za 008 06 treba i lookup u tablicu gdje postoji podatak o tome jel tekuci casopis ili nije?
39  ## c - Continuing resource currently published  ## c - Continuing resource currently published
# Line 39  marc_fixed('008','00', '070707');      # 00-0 Line 41  marc_fixed('008','00', '070707');      # 00-0
41    
42  my $year = rec('210','c');  my $year = rec('210','c');
43    
44  if ( rec('210','c') ) {  #if ( rec('210','c') ) {
45          marc_fixed('008','06','s');             # 06 - Type of date/Publication status, s = single know date  #       marc_fixed('008','06','s');             # 06 - Type of date/Publication status, s = single know date
46            #      
47  #       warn "## year = $year";  ##      warn "## year = $year";
48    #
49          if ( $year =~ m/^(\d{4})/ ) {  #       if ( $year =~ m/^(\d{4})/ ) {
50  #       warn "## $1 ##\n";  ##      warn "## $1 ##\n";
51                  marc_fixed('008','07',$1);              # 07-10 - Date 1  #               marc_fixed('008','07',$1);              # 07-10 - Date 1
52          }  #       }
53    #
54    #       if ( $year =~ m/^\d{4}-(\d{4})/ ) {
55    ##      warn "## $1 ##";
56    #               marc_fixed('008','11',$1);              # 11-14 - Date 2
57    #               marc_fixed('008','06','d');
58    #       }
59    #      
60    #} else {
61    #       marc_fixed('008','06','n');             # 06 - n = unknown date
62    #}
63    
64          if ( $year =~ m/^\d{4}-(\d{4})/ ) {  if ( rec('210','c') ) {
65  #       warn "## $1 ##";          my $d1 = '';
66                  marc_fixed('008','11',$1);              # 11-14 - Date 2          my $d2 = '';
67                  marc_fixed('008','06','d');          if ( rec('210','c') =~ m/(\d{4})-/ ) {
68                    marc_fixed('008','06','m');
69                    if ( rec('210','c') =~ m/(\d{4})-/ ) {
70                            $d1 = $1;
71                            $d2 = '9999';
72                    }
73                    if ( rec('210','c') =~ m/-(\d{4})/ ) {
74                            $d2 = $1;
75                    }
76            } else {
77                    marc_fixed('008','06','s');
78                    if ( rec('210','c') =~ m/(\d{4})/ ) {
79                            $d1 = $1;
80                    }
81                    if ( rec('210','c') =~ m/(\d{2})(--|__)/ ) {
82                            $d1 = $1.'uu';
83                    }
84                    if ( rec('210','c') =~ m/(\d{3})(-|_)/ ) {
85                            $d1 = $1.'u';
86                    }
87          }          }
88                    marc_fixed('008','07',$d1);             # 07-10 - Date 1
89            marc_fixed('008','11',$d2);             # 07-10 - Date 1
90  } else {  } else {
91          marc_fixed('008','06','n');             # 06 - n = unknown date          marc_fixed('008','06','n');             # 06 - n = unknown date
92            marc_fixed('008','07','uuuu');
93  }  }
94    
   
95  marc_fixed('008','15',                  # 15-17 - Place of publication, production, or execution  marc_fixed('008','15',                  # 15-17 - Place of publication, production, or execution
96          lc ( rec('102') )          lc ( rec('102') )
97  );  );
# Line 241  if (   ( rec('200','a') =~ m/^A /) || Line 273  if (   ( rec('200','a') =~ m/^A /) ||
273  marc_compose('245',  marc_compose('245',
274          'a', suffix(          'a', suffix(
275                  ( ! ( rec('200','d') || rec('200','e') || rec('200','k') ) ) && ( rec('200','f') ) ? ' /' :                    ( ! ( rec('200','d') || rec('200','e') || rec('200','k') ) ) && ( rec('200','f') ) ? ' /' :  
276                  ( rec('200','d') ) ? ' = ' :                  ( rec('200','d') ) ? ' =' :
277                  ( rec('200','e') ) ? ' : ' :                  ( rec('200','e') ) ? ' :' :
278                  ( rec('200','k') ) ? ' ; ' :                  ( rec('200','k') ) ? ' ;' :
279                          '',                          '',
280                          rec('200','a'),                          rec('200','a'),
281          ),          ),

Legend:
Removed from v.1181  
changed lines
  Added in v.1182

  ViewVC Help
Powered by ViewVC 1.1.26