/[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.12 by dpavlin, Mon Jun 24 16:16:13 2002 UTC revision 1.18 by dpavlin, Wed Jul 17 16:55:24 2002 UTC
# Line 49  while(<CF>) { Line 49  while(<CF>) {
49          if (/^database-name:([^=]+)=(.*)$/) {          if (/^database-name:([^=]+)=(.*)$/) {
50                  my ($db_name,$db_desc) = ($1,$2);                  my ($db_name,$db_desc) = ($1,$2);
51                  $db_desc=~s/^##\w+##//g;                  $db_desc=~s/^##\w+##//g;
52                  $DatabaseDescriptions{$db_name}=$db_desc;                  # c_iso_852 is a cludge so that output format would be
53                    # correct 8859-2 again...
54                    $DatabaseDescriptions{$db_name}=c_iso_852($db_desc);
55          }          }
56  }  }
57  close(CF);  close(CF);
# Line 325  foreach my $isis_db (@isis_dbs) { Line 327  foreach my $isis_db (@isis_dbs) {
327          my $row = OpenIsis::read( $db, $row_id );          my $row = OpenIsis::read( $db, $row_id );
328          if (my $tmp = $row->{'200'}->[0]) {          if (my $tmp = $row->{'200'}->[0]) {
329    
330                  my $bib = "%MFN $row->{mfn}\n";                  my $bib;
331                  my $mps = "W $row->{mfn} 14\n";                  my $mps = "W $row->{mfn} 14\n";
332    
333                  my $pcnt = int($row->{mfn} * 100 / $max_rowid);                  my $pcnt = int($row->{mfn} * 100 / $max_rowid);
# Line 346  foreach my $isis_db (@isis_dbs) { Line 348  foreach my $isis_db (@isis_dbs) {
348                  $headline =~ s/\s+$//g;                  $headline =~ s/\s+$//g;
349    
350                  # author                  # author
351                  $bib .= isis_to_bib($row,'700','%700+','*',2,'>',', ');                  $bib .= isis_to_bib($row,'700','%700+','ab',undef,'>',', ');
352                  $bib .= isis_to_bib($row,'701','%700+','*',2,'>',', ');                  $bib .= isis_to_bib($row,'701','%700+','ab',undef,'>',', ');
353                  $bib .= isis_to_bib($row,'710','%700+','*',2,'>',', ');                  $bib .= isis_to_bib($row,'701','%700+','cd',undef,'>',', ');
354                  $bib .= isis_to_bib($row,'711','%700+','*',2,'>',', ');  
355                  $bib .= isis_to_bib($row,'503','%700+','*',2,'>',', ');                  my $tmp;
356                    $tmp = isis_sf($row,'710','abc', '', '', (' : ',', '));
357                    $tmp .= isis_sf($row,'710','dfe', ' (', ')', ('', ' ; ',' ; '));
358                    $bib .= "%700+ $tmp\n" if ($tmp);
359    
360                    $tmp = isis_sf($row,'711','abc', '', '', (' : ',', '));
361                    $tmp .= isis_sf($row,'711','dfe', ' (', ')', ('', ' ; ',' ; '));
362                    $bib .= "%700+ $tmp\n" if ($tmp);
363    
364                    $bib .= isis_to_bib($row,'503','%700+','ab',undef,'>',', ');
365    
366                  $mps .= isis_to_mps($row,'700',1);                  $mps .= isis_to_mps($row,'700',1);
367                  $mps .= isis_to_mps($row,'701',1);                  $mps .= isis_to_mps($row,'701',1);
# Line 386  foreach my $isis_db (@isis_dbs) { Line 397  foreach my $isis_db (@isis_dbs) {
397                  $mps .= isis_to_mps($row,'233',2,"ae");                  $mps .= isis_to_mps($row,'233',2,"ae");
398    
399    
                 my $tmp;  
400                  $tmp =  isis_sf($row,'230','v').                  $tmp =  isis_sf($row,'230','v').
401                          isis_sf($row,'230','a',' : ').                          isis_sf($row,'230','a',' : ').
402                          isis_sf($row,'250',undef,'. - ').                          isis_sf($row,'250',undef,'. - ').
# Line 472  foreach my $isis_db (@isis_dbs) { Line 482  foreach my $isis_db (@isis_dbs) {
482                  $bib .= isis_to_bib($row,'610','%610');                  $bib .= isis_to_bib($row,'610','%610');
483                  $mps .= isis_to_mps($row,'610',8);                  $mps .= isis_to_mps($row,'610',8);
484    
485                  $bib .= isis_to_bib($row,'675','%675+');                  $bib .= isis_to_bib($row,'675','%675+','a');
486                  $mps .= isis_to_mps($row,'675',9);                  $mps .= isis_to_mps($row,'675',9);
487                  $bib .= isis_to_bib($row,'686','%675+');                  $bib .= isis_to_bib($row,'686','%675+','a');
488                  $mps .= isis_to_mps($row,'686',10);                  $mps .= isis_to_mps($row,'686',10);
489    
490                  $bib .= isis_to_bib($row,'990','%990');                  $bib .= isis_to_bib($row,'990','%990');
# Line 483  foreach my $isis_db (@isis_dbs) { Line 493  foreach my $isis_db (@isis_dbs) {
493                  $bib .= isis_to_bib($row,'991','%991');                  $bib .= isis_to_bib($row,'991','%991');
494                  $mps .= isis_to_mps($row,'991',12);                  $mps .= isis_to_mps($row,'991',12);
495    
496                    # Jezik
497                    $bib .= isis_to_bib($row,'101','%101');
498                    $mps .= isis_to_mps($row,'101',16);
499                    # Pismo
500                    $bib .= isis_to_bib($row,'998','%101', 'a');
501    
502                  sub isis_isn_to_mps {                  sub isis_isn_to_mps {
503                          my $row = shift @_ || die;                          my $row = shift @_ || die;
504                          my $isis_id = shift @_ || die;                          my $isis_id = shift @_ || die;
# Line 514  foreach my $isis_db (@isis_dbs) { Line 530  foreach my $isis_db (@isis_dbs) {
530    
531                  $mps .= isis_to_mps($row,'532',1);                  $mps .= isis_to_mps($row,'532',1);
532    
533                  $bib .= isis_to_bib($row,'994','%994a','a');                  $bib .= '%knjiz '.$DatabaseDescriptions{$db_dir}.", ".$row->{mfn}."\n";
   
534                  # headline                  # headline
535                  if ($headline) {                  if ($headline) {
536                          $headline .= " <i>(".$DatabaseDescriptions{$db_dir}.", ".$row->{mfn}.")</i>";   ## debug MFN!                          $headline .= " <i>(".$DatabaseDescriptions{$db_dir}.", ".$row->{mfn}.")</i>";   ## debug MFN!
537                          $headline =~ s/&/&and;/g;                          $headline =~ s/&/&and;/g;
538                          $headline =~ s/</&lt;/g;                          $headline =~ s/</&lt;/g;
539                          $headline =~ s/>/&gt;/g;                          $headline =~ s/>/&gt;/g;
                         $headline =~ s/&lt;(\/?[bi])&gt;/<$1>/g;  
540                          $mps .= "H ".c_852_iso($headline)."\n";                          $mps .= "H ".c_852_iso($headline)."\n";
541                  } else {                  } else {
542                          $mps .= "H nepoznato\n";                          $mps .= "H nepoznato\n";

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.18

  ViewVC Help
Powered by ViewVC 1.1.26