--- isis2stream.pl 2002/06/16 19:55:19 1.9 +++ isis2stream.pl 2002/06/24 13:46:53 1.10 @@ -41,6 +41,20 @@ require "./search/config.pm"; #-------------------------------------------------------------------- +# read database configuration, store database names +open(CF,$common::database_cf) || die "$common::database_cf: $!"; +my %DatabaseDescriptions; +while() { + chomp; + if (/^database-name:([^=]+)=(.*)$/) { + my ($db_name,$db_desc) = ($1,$2); + $db_desc=~s/^##\w+##//g; + $DatabaseDescriptions{$db_name}=$db_desc; + } +} +close(CF); + +#-------------------------------------------------------------------- # # expand(nr,"space separated string"); # @@ -315,8 +329,10 @@ } my $headline; - $headline .= isis_sf($row,'200','a',"'"); - $headline .= isis_sf($row,'200','e'," : ","'"); + $headline .= isis_sf($row,'200','a'); + $headline .= isis_sf($row,'200','e'," : "); + $headline .= isis_sf($row,'200','f'," / "); + $headline .= isis_sf($row,'210','d'," , "); # author $bib .= isis_to_bib($row,'700','%700+','*',2,'<'); @@ -392,9 +408,6 @@ $mps .= isis_to_mps($row,'272',2); $mps .= isis_to_mps($row,'273',2); - $headline .= isis_sf($row,'700','b'," "); - $headline .= isis_sf($row,'700','a'," "); - # izdavac $mps .= isis_to_mps($row,'210',3); $mps .= isis_to_mps($row,'250',3); @@ -414,7 +427,6 @@ $year =~ s/^\s*cop\.*\s*//i; $year =~ s/[\[\]]*//g; $mps .= "D ${year}\n" if ($year !~ m/\?/ && $year =~ /\d{4}/); - $headline .= " ($year)"; } $mps .= isis_to_mps($row,'215',15); @@ -493,10 +505,11 @@ # headline if ($headline) { - $headline .= " [".$row->{mfn}."]"; ## debug MFN! + $headline .= " (".$DatabaseDescriptions{$db_dir}.", ".$row->{mfn}.")"; ## debug MFN! $headline =~ s/&/∧/g; $headline =~ s//>/g; + $headline =~ s/<(\/?[bi])>/<$1>/g; $mps .= "H ".c_852_iso($headline)."\n"; } else { $mps .= "H nepoznato\n";