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 |
# |
# |
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,'<'); |
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); |
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); |
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/&/∧/g; |
$headline =~ s/&/∧/g; |
510 |
$headline =~ s/</</g; |
$headline =~ s/</</g; |
511 |
$headline =~ s/>/>/g; |
$headline =~ s/>/>/g; |
512 |
|
$headline =~ s/<(\/?[bi])>/<$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"; |