/[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 816 by dpavlin, Thu Apr 5 21:48:41 2007 UTC revision 824 by dpavlin, Fri May 18 20:27:21 2007 UTC
# Line 57  if ( rec('994','c') ) { Line 57  if ( rec('994','c') ) {
57  ## FIXME treba velika slova pretvoriti u mala  ## FIXME treba velika slova pretvoriti u mala
58    
59  marc_fixed('008','35',  marc_fixed('008','35',
60          first( rec('101') )          first( lc(rec('101')) )
61  );  );
62    
63    
# Line 69  marc_fixed('008','35', Line 69  marc_fixed('008','35',
69    
70    
71  marc('035','6',  marc('035','6',
72  join_with(' ',  join_with('',
73  #               config('input normalize path'),  #               config('input normalize path'),
74  #               config('name'),  #               config('name'),
75                  config(),                  config(),
# Line 225  marc_indicators('245', $i1, 0); Line 225  marc_indicators('245', $i1, 0);
225    
226  if (    ( rec('200','a') =~ m/^Die /) ||  if (    ( rec('200','a') =~ m/^Die /) ||
227          ( rec('200','a') =~ m/^Das /) ||          ( rec('200','a') =~ m/^Das /) ||
228            ( rec('200','a') =~ m/^Der /) ||
229          ( rec('200','a') =~ m/^The /) ) {          ( rec('200','a') =~ m/^The /) ) {
230                  marc_indicators('245', $i1, 4);                  marc_indicators('245', $i1, 4);
231  }  }
# Line 245  if (   ( rec('200','a') =~ m/^An /) && ( Line 246  if (   ( rec('200','a') =~ m/^An /) && (
246    
247  marc_compose('245',  marc_compose('245',
248          'a', suffix(          'a', suffix(
249                  ( ! rec('200','b') && ( rec('200','f') || rec('200','c') ) ) ? ' / ' : ' ',                  ( ! rec('200','p') && ( rec('200','f') || rec('200','c') ) ) ? ' / ' :  
250                    ( rec('200','p') && rec('200','c') ) ? ' : '  :
251                            '',
252                          rec('200','a'),                          rec('200','a'),
253          ),          ),
254          'b', suffix(          'b', suffix(
255                  ( rec('200','b') && rec('200','f') ) ? ' / ' :                  ( rec('200','p') && rec('200','f') ) ? ' / ' :
256                  ( rec('200','b') && rec('200','c') ) ? '. '  :                  ( rec('200','p') && rec('200','c') ) ? '. '  :
257                          ' ',                          '',
258                          rec('200','b'),                          rec('200','p'),
259          ),          ),
260          'c', suffix(          'c', suffix(
261                  ( rec('200','f') && rec('200','c') ) ? '. ' :                  ( rec('200','f') && rec('200','c') ) ? '. ' :
262                          ' ',                          '',
263                          rec('200','f'),                          rec('200','f'),
264          ),          ),
265          '+', rec('200','c'),          '+', rec('200','c'),
# Line 307  marc_compose('245', Line 310  marc_compose('245',
310    
311  ### 250  ### 250
312    
313  marc('250','a',  marc_compose('250',
314          suffix(          'a',suffix(
315                  rec('205','f') ? ' / ' :                  rec('205','f') ? ' / ' :
316                                   ' '.                          ' ',
317                          rec('205','a')                          rec('205','a')
318          )          ),
319            'b', rec('205','f'),
320  );  );
321    
322  marc('250','b',  #marc('250','b',
323          rec('205','f')  #       rec('205','f')
324  );  #);
325    
326    
327  ### 260  ### 260
# Line 380  if (   ( rec('225','a') =~ m/^An /) && ( Line 384  if (   ( rec('225','a') =~ m/^An /) && (
384                  marc_indicators('440', ' ', 2);                  marc_indicators('440', ' ', 2);
385  }  }
386    
387  marc('440','a',  #_debug(3);
388          rec('225','a'),  
389    marc('440',
390            'a', suffix( rec('225','f'),
391                            rec('225','a'),
392            ),
393  );  );
394    
395    #       join_with(' / ',
396    #               join_with(' ',
397    #                       rec('225','a'),
398    #                       rec('225','p'),
399    #               ),
400    #                       rec('225','f')
401    #       ),
402    
403    #_debug(0);
404    
405  marc('440','n',  marc('440','n',
406          rec('225','h')          rec('225','h')
407  );  );
# Line 642  marc('740','a', Line 660  marc('740','a',
660    
661  ### generiranje zapisa o nakladničkoj cjelini i povezivanje podređenog zapisa s nadređenim  ### generiranje zapisa o nakladničkoj cjelini i povezivanje podređenog zapisa s nadređenim
662    
663    if (
664            rec('225','a')  # da li je nakladnicka cjelina?
665    ) {
666    
667    my $series_key =
668    join_with('',
669            rec('225','a'),
670            rec('210','a'),
671            rec('210','b'),
672    );
673    
674    my $series = get( $series_key );
675    
676    if ($series) {
677            warn "nije novi";
678    } else {
679    
680    
681    $series = join_with('',
682            config(),
683            'LS',
684            rec('000')
685    );
686    
687    set( $series_key => $series );
688    
689    }
690    }
691    
692  my $series_key = join_with('',  my $series_key = join_with('',
693          rec('225','a'),          rec('225','a'),
# Line 657  if ($series_key) { Line 703  if ($series_key) {
703                  get( $series_key )                  get( $series_key )
704          );          );
705  }  }
   
706  ### testing  ### testing
707  #  #
708  # my $dup_key = join_with('',  # my $dup_key = join_with('',

Legend:
Removed from v.816  
changed lines
  Added in v.824

  ViewVC Help
Powered by ViewVC 1.1.26