kbart, Sage, Taylor and Francis
[webpac2] / conf / hpm / casopis2marc.pl
1 ### LEADER
2
3 ## LDR 05 - n - new
4 marc_leader('05','n');
5
6 ## LDR 06 - a - language material 
7 marc_leader('06','a');
8
9 ## LDR 07 - Bibliographic level 
10 marc_leader('07','s');  
11
12 ## LDR 17 - Encoding level ; 7 - minimal level, u - unknown
13 marc_leader('17','u');
14
15 ## LDR 18 - i - isbd 
16 marc_leader('18','i');
17
18 ## LDR 19 - Multipart resource record level ; # - Not specified or not applicable, a - Set, b - Part with independent title, c - Part with dependent title 
19 #marc_leader('19','a');
20
21 ### 005 
22 marc_fixed('005','00', rec('B'));
23
24 ### 008 - All materials
25
26 if ( rec('A') =~ m/20(\d{6})/ ) {
27         marc_fixed('008','00', $1);     # 00-05 - Date entered on file
28 }
29
30 ## za 008 06 treba i lookup u tablicu gdje postoji podatak o tome jel tekuci casopis ili nije?
31 ## c - Continuing resource currently published
32 ## d - Continuing resource ceased publication
33
34 marc_fixed('008','06','c');
35
36 marc_fixed('008','15',                  # 15-17 - Place of publication, production, or execution
37         lc ( rec('Z') ) 
38 );
39
40 marc_fixed('008','35',
41         rec('Y')                # 35-37 - Language
42 );
43                                         # 38 - Modified record
44                                         # 39 - Cataloging source
45
46 ### 008 - Continuing resources
47 marc_fixed('008','18', rec('N') );      # 18 - Frequency
48 marc_fixed('008','19', rec('O') );      # 19 - Regularity
49                                 # 20 - Undefined, ontains a blank (#) or fill character (|)
50
51 # 008 21
52 marc_fixed('008','21', 'p');    # 21 - Type of continuing resource
53
54                                 # 22 - Form of original item - blank
55                                 # 23 - Form of item
56                                 # 24 - Nature of entire work
57                                 # 25-27 - Nature of contents
58                                 # 28 - Government publication
59                                 # 29 - Conference publication
60                                 # 30-32 - Undefined
61                                 # 33 - Original alphabet or script of title
62                                 # 34 - Entry convention
63
64 ### 022
65 marc('022','a',
66         rec('P')
67 );
68
69 marc('030','a',
70         rec('U')
71 );
72
73 ### 035$6
74 # privemeno koristimo 0356 umjesto 0359, zato ¹to marclint 9 prijavljuje kao gre¹ku
75
76 marc('035','a', 
77         join_with('',
78                 '(HR-ZaDZI)P',
79                 rec('C')
80         )
81 );
82
83 ### 040
84 # za sve je isti
85
86 marc('040','a',
87         'HR-ZaDZI'
88 );
89
90 marc('040','b',
91         'hrv'
92 );
93
94 marc('040','e',
95         'HR PPIAK'
96 );
97
98 ### 041 - indikatori
99
100 #marc_indicators('041', 0, ' ');
101
102 ### 041
103
104 #marc_repeatable_subfield('041','a',
105 #       rec('Y')
106 #);
107
108
109 #_debug(3);
110
111 ### 044 - zemlja izdavanja
112
113 #marc('044','a',
114 #       rec('Z')
115 #);
116
117 ### 080
118
119 marc('080','a',
120         rec('V')
121 );
122
123 ### 210 indikatori
124 # marc_indicators('210', '1',' ');
125
126 ### 210 - ABBREVIATED TITLE 
127 marc_indicators('210','1',' ');
128 marc('210','a',
129         rec('T')
130 );
131         
132
133
134 ### 222 indikatori
135 # drugi indikator prema èlanu
136 # potrebna naknadna kontrola
137
138 marc_indicators('222',' ','0');
139
140 ### 222 - Key title
141
142 marc('222','a',
143         rec('Q')
144 );
145
146 ### 245 indikatori
147 # generiraju se prema èlanu, trebalo bi mo¾da i prema jeziku (jezika nema uvijek). 
148 # potrebna naknadna kontrola
149
150 marc_indicators('245', 0, 0);
151
152 if (    ( rec('E') =~ m/^Die /) || 
153         ( rec('E') =~ m/^Das /) || 
154         ( rec('E') =~ m/^Der /) || 
155         ( rec('E') =~ m/^Les /) || 
156         ( rec('E') =~ m/^The /) ) {
157                 marc_indicators('245', 0, 4);
158
159
160
161 if (    ( rec('E') =~ m/^Un /) || 
162         ( rec('E') =~ m/^An /) ||
163         ( rec('E') =~ m/^La /) ||
164         ( rec('E') =~ m/^Le /) ||
165         ( rec('E') =~ m/^Il /) ) {
166                 marc_indicators('245', 0, 3);
167
168
169 if (    ( rec('E') =~ m/^A /) || 
170         ( rec('E') =~ m/^L'/) ) {
171                 marc_indicators('245', 0, 2);
172
173
174 ### 245
175
176 my $naslov = '' ;
177 my $podnaslov = '' ;
178 my $odgovornost = '' ;
179
180 if ( rec('E') =~ m/\$a(.*)\$e(.*)\$f(.*)/ ) {
181         $naslov = $1;
182         $podnaslov = $2;
183         $odgovornost = $3;
184 } elsif ( rec('E') =~ m/\$a(.*)\$e(.*)/ ) {
185         $naslov = $1;
186         $podnaslov = $2;
187 } elsif ( rec('E') =~ m/\$a(.*)\$f(.*)/ ) {
188         $naslov = $1;
189         $odgovornost = $2;
190 } elsif ( rec('E') =~ m/\$a(.*)/ ) {
191         $naslov = $1;
192 }
193 marc('245','a', $naslov);
194 marc('245','b', $podnaslov);
195 marc('245','c', $odgovornost);
196
197
198 ### 246 inikatori
199
200 ### 246
201
202 #_debug(0);
203
204
205 ## 260 - izdavanje
206
207 my $mjesto = '' ;
208 my $izdavac = '' ;
209
210 if ( rec('H') =~ m/\$a(.*)\$c(.*)/ ) {
211         $mjesto = $1 . ' :';
212         $izdavac = $2 . ', ';
213 }
214 marc('260','a', $mjesto);
215 marc('260','b', $izdavac);
216 marc('260','c',
217         rec('G')
218 );
219
220 ## 300
221 marc('300','a', ' sv. :');
222 marc('300','c',
223         rec('K')
224 );
225
226 ## 310
227
228 marc('310','a',
229         rec('L')
230 );
231
232 marc('500','a',
233         rec('AA')
234 );
235
236 marc_indicators('780',' ','0');
237 marc('780','t',
238         rec('R')
239 );
240
241 marc_indicators('785',' ','0');
242 marc('785','t',
243         rec('S')
244 );
245
246 marc('942','c','C');
247
248 marc('952','a',
249         lookup(
250                 sub { rec('K') },
251                 'dziv','inventar',
252                 sub { rec('A') },
253                 sub { rec('C') }
254         )
255 );
256
257 marc('952','b',
258         lookup(
259                 sub { rec('K') },
260                 'dziv','inventar',
261                 sub { rec('A') },
262                 sub { rec('C') }
263         )
264 );
265
266 marc('952','d',
267         lookup(
268                 sub { rec('I') },
269                 'dziv','inventar',
270                 sub { rec('A') },
271                 sub { rec('C') }
272         )
273 );
274
275 marc('952','h',
276         lookup(
277                 sub { join_with('', 
278                         join_with(':',
279                                 rec('E'),
280                                 rec('F'), 
281                         ),
282                         rec('D')
283                         
284                 ) },
285                 'dziv','inventar',
286                 sub { rec('A') },
287                 sub { rec('C') }
288         )
289 );
290
291 marc('952','r',
292         lookup(
293                 sub { rec('M') },
294                 'dziv','inventar',
295                 sub { rec('A') },
296                 sub { rec('C') }
297         )
298 );
299
300 marc('952','t',
301         lookup(
302                 sub { rec('H') },
303                 'dziv','inventar',
304                 sub { rec('A') },
305                 sub { rec('C') }
306         )
307 );
308
309 marc('952','y',
310         lookup(
311                 sub { rec('P') },
312                 'dziv','inventar',
313                 sub { rec('A') },
314                 sub { rec('C') }
315         )
316 );