vhost
[webpac2] / conf / ffcasopisi / sigxls2marc.pl
1 my $csigid =
2         lookup(
3                 sub { rec('A') },
4                 'casopisi','csigid',
5                 sub { rec('A') },
6                 sub { rec('I') }
7         );
8
9 if ( ! $csigid ) {
10
11
12 ### LEADER
13
14 ## LDR 05 - n - new
15 marc_leader('05','n');
16
17 ## LDR 06 - a - language material 
18 marc_leader('06','a');
19
20 ## LDR 07 - Bibliographic level 
21 marc_leader('07','s');
22
23 ## LDR 17 - Encoding level ; 7 - minimal level, u - unknown
24 marc_leader('17','u');
25
26 ## LDR 18 - i - isbd 
27 marc_leader('18','i');
28
29 ### 008 - All materials
30 marc_fixed('008','00', '090820');       # 00-05 - Date entered on file
31
32 ## za 008 06 treba i lookup u tablicu u kojoj postoji podatak o tome jel tekuci casopis ili nije?
33 ## c - Continuing resource currently published
34 ## d - Continuing resource ceased publication
35
36 marc_fixed('008','06','|');             # 06 - Type of date/Publication status, s = single know date, | = no attempt to code
37 marc_fixed('008','07','||||');
38 marc_fixed('008','11','||||');
39 marc_fixed('008','15','xx ');
40                                         # 18-34 - Material specific coded elements 
41                                         # 35-37 - Language
42 marc_fixed('008','38','|');             # 38 - Modified record
43 marc_fixed('008','39','d');             # 39 - Cataloging source
44
45 ### 008 - Continuing resources
46
47 marc_fixed('008','18', '|');    # 18 - Frequency - ovo treba popuniti iz polja 326
48 marc_fixed('008','19', '|');    # 19 - Regularity
49                                 # 20 - Undefined, ontains a blank (#) or fill character (|)
50
51 marc_fixed('008','21', 'p');    # 21 - Type of continuing resource
52
53                                 # 22 - Form of original item - blank
54                                 # 23 - Form of item
55                                 # 24 - Nature of entire work
56                                 # 25-27 - Nature of contents
57                                 # 28 - Government publication
58                                 # 29 - Conference publication
59                                 # 30-32 - Undefined
60                                 # 33 - Original alphabet or script of title
61                                 # 34 - Entry convention
62 marc_fixed('008','22', ' ');
63 marc_fixed('008','23', ' ');
64 marc_fixed('008','24', '|');
65 marc_fixed('008','25', '|||');
66 marc_fixed('008','28', ' ');
67 marc_fixed('008','29', '|');
68 marc_fixed('008','33', '|');
69 marc_fixed('008','34', '0');
70
71 ### 022
72
73 marc('022','a',
74         rec('F')
75 );
76
77 ### 035$a
78
79 marc('035','a',
80         prefix('HR-ZaFF csig',
81                 rec('I') 
82         ),
83 );
84
85 ### 040
86 # za sve je isti
87 # treba utvrditi toènu oznaku za ustanovu
88
89 marc('040','a',
90         'HR FFZG'
91 );
92
93 marc('040','b',
94         'hrv'
95 );
96
97 marc('040','c',
98         'HR-ZaFF'
99 );
100
101 marc('040','e',
102         'ppiak'
103 );
104
105
106 #_debug(3);
107
108
109 marc_indicators('245', 0, 0);
110
111 if (    ( rec('E') =~ m/^Die /) || 
112         ( rec('E') =~ m/^Das /) || 
113         ( rec('E') =~ m/^Der /) || 
114         ( rec('E') =~ m/^Les /) || 
115         ( rec('E') =~ m/^The /) ) {
116                 marc_indicators('245', 0, 4);
117
118
119
120 if (    ( rec('E') =~ m/^Un /) || 
121         ( rec('E') =~ m/^An /) ||
122         ( rec('E') =~ m/^La /) ||
123         ( rec('E') =~ m/^Le /) ||
124         ( rec('E') =~ m/^Il /) ) {
125                 marc_indicators('245', 0, 3);
126
127
128 if (    ( rec('E') =~ m/^A /) || 
129         ( rec('E') =~ m/^L'/) ) {
130                 marc_indicators('245', 0, 2);
131
132
133 ### 245
134
135 my ($a,$b,$c);
136 my $naslov = rec('E');
137 $c = $2 if $naslov =~ s{(\s+/)\s+(.+)$}{$1};
138 if ( $naslov =~ s{^(.+?[:=])\s+}{} ) {
139         $a = $1;
140         $b = $naslov ;
141 } else {
142         $a = $naslov ;
143 }
144
145
146 marc('245','a', $a);
147 marc('245','b', $b) if $b;
148 marc('245','c', $c);
149
150 #if ( rec('E') =~ m/:/ ) {
151 #       marc('245','a',
152 #               suffix(' :',
153 #                       regex('s/(^.*):.*/$1/',
154 #                               rec('E')
155 #                       )
156 #               )
157 #       );
158 #       marc('245','b',
159 #               regex('s/^.*: (.*)/$1/',
160 #                       rec('E')
161 #               )
162 #       );
163 #} else {
164 #       marc('245','a',
165 #               rec('E')
166 #       );
167 #}
168
169 marc('500','a',
170         rec('H'),
171 );
172
173
174 ### 866
175 marc_indicators('866',' ','0');
176 marc('866','a',
177         rec('G')
178 );
179
180
181 ### 942
182
183 marc('942','b',
184         'PER'
185 );
186
187 marc('942','c',
188         'PER'
189 );
190
191 marc('942','d',
192         rec('C')
193 );
194
195 marc('942','i',
196         rec('C')
197 );
198
199 } #csigid