/[webpac-proto]/isis2stream.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 /isis2stream.pl

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

revision 1.9 by dpavlin, Sun Jun 16 19:55:19 2002 UTC revision 1.10 by dpavlin, Mon Jun 24 13:46:53 2002 UTC
# Line 41  foreach (split(/\n/,$common::mps_header) Line 41  foreach (split(/\n/,$common::mps_header)
41  require "./search/config.pm";  require "./search/config.pm";
42    
43  #--------------------------------------------------------------------  #--------------------------------------------------------------------
44    # read database configuration, store database names
45    open(CF,$common::database_cf) || die "$common::database_cf: $!";
46    my %DatabaseDescriptions;
47    while(<CF>) {
48            chomp;
49            if (/^database-name:([^=]+)=(.*)$/) {
50                    my ($db_name,$db_desc) = ($1,$2);
51                    $db_desc=~s/^##\w+##//g;
52                    $DatabaseDescriptions{$db_name}=$db_desc;
53            }
54    }
55    close(CF);
56    
57    #--------------------------------------------------------------------
58  #  #
59  # expand(nr,"space separated string");  # expand(nr,"space separated string");
60  #  #
# Line 315  foreach my $isis_db (@isis_dbs) { Line 329  foreach my $isis_db (@isis_dbs) {
329                  }                  }
330    
331                  my $headline;                  my $headline;
332                  $headline .= isis_sf($row,'200','a',"'");                  $headline .= isis_sf($row,'200','a');
333                  $headline .= isis_sf($row,'200','e'," : ","'");                  $headline .= isis_sf($row,'200','e'," : ");
334                    $headline .= isis_sf($row,'200','f'," / ");
335                    $headline .= isis_sf($row,'210','d'," , ");
336    
337                  # author                  # author
338                  $bib .= isis_to_bib($row,'700','%700+','*',2,'<');                  $bib .= isis_to_bib($row,'700','%700+','*',2,'<');
# Line 392  foreach my $isis_db (@isis_dbs) { Line 408  foreach my $isis_db (@isis_dbs) {
408                  $mps .= isis_to_mps($row,'272',2);                  $mps .= isis_to_mps($row,'272',2);
409                  $mps .= isis_to_mps($row,'273',2);                  $mps .= isis_to_mps($row,'273',2);
410    
                 $headline .= isis_sf($row,'700','b'," ");  
                 $headline .= isis_sf($row,'700','a'," ");  
   
411                  # izdavac                  # izdavac
412                  $mps .= isis_to_mps($row,'210',3);                  $mps .= isis_to_mps($row,'210',3);
413                  $mps .= isis_to_mps($row,'250',3);                  $mps .= isis_to_mps($row,'250',3);
# Line 414  foreach my $isis_db (@isis_dbs) { Line 427  foreach my $isis_db (@isis_dbs) {
427                          $year =~ s/^\s*cop\.*\s*//i;                          $year =~ s/^\s*cop\.*\s*//i;
428                          $year =~ s/[\[\]]*//g;                          $year =~ s/[\[\]]*//g;
429                          $mps .= "D ${year}\n" if ($year !~ m/\?/ && $year =~ /\d{4}/);                          $mps .= "D ${year}\n" if ($year !~ m/\?/ && $year =~ /\d{4}/);
                         $headline .= " ($year)";  
430                  }                  }
431    
432                  $mps .= isis_to_mps($row,'215',15);                  $mps .= isis_to_mps($row,'215',15);
# Line 493  foreach my $isis_db (@isis_dbs) { Line 505  foreach my $isis_db (@isis_dbs) {
505    
506                  # headline                  # headline
507                  if ($headline) {                  if ($headline) {
508                          $headline .= " [".$row->{mfn}."]";      ## debug MFN!                          $headline .= " <i>(".$DatabaseDescriptions{$db_dir}.", ".$row->{mfn}.")</i>";   ## debug MFN!
509                          $headline =~ s/&/&and;/g;                          $headline =~ s/&/&and;/g;
510                          $headline =~ s/</&lt;/g;                          $headline =~ s/</&lt;/g;
511                          $headline =~ s/>/&gt;/g;                          $headline =~ s/>/&gt;/g;
512                            $headline =~ s/&lt;(\/?[bi])&gt;/<$1>/g;
513                          $mps .= "H ".c_852_iso($headline)."\n";                          $mps .= "H ".c_852_iso($headline)."\n";
514                  } else {                  } else {
515                          $mps .= "H nepoznato\n";                          $mps .= "H nepoznato\n";

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

  ViewVC Help
Powered by ViewVC 1.1.26