34 |
# Application Constants |
# Application Constants |
35 |
# |
# |
36 |
|
|
|
# Field Names |
|
|
%default::FieldNames = ( |
|
|
'700+', 'Autor(i)', |
|
|
'200', 'Naslov', |
|
|
'205', 'Izdanje', |
|
|
'210', 'Izdavanje', |
|
|
'215', 'Materijalni opis', |
|
|
'225', 'Nakladnička cjelina', |
|
|
'300+', 'Napomena', |
|
|
'330', 'Sadržaj', |
|
|
'423', 'Prikriveni radovi', |
|
|
'464', 'Analitički radovi', |
|
|
'610', 'Ključne riječi', |
|
|
'675+', 'Klasifik. oznaka', |
|
|
'990', 'Signatura', |
|
|
'991', 'Inventarni broj', |
|
|
'ISBN', 'ISBN', |
|
|
'MFN', 'MFN', |
|
|
'994a', 'Knjižnica', |
|
|
|
|
|
|
|
|
'A', 'Author(s)', |
|
|
'B', 'Book', |
|
|
'C', 'City', |
|
|
'D', 'Date', |
|
|
'E', 'Editor', |
|
|
'F', 'Footnote', |
|
|
'G', 'Order Info', |
|
|
'H', 'Commentary', |
|
|
'I', 'Publisher', |
|
|
'J', 'Journal', |
|
|
'K', 'Keyword', |
|
|
'L', 'Label', |
|
|
'M', 'Bell', |
|
|
'N', 'Issue', |
|
|
'O', 'Other', |
|
|
'P', 'Page', |
|
|
'Q', 'Corporate', |
|
|
'R', 'Report', |
|
|
'S', 'Series', |
|
|
'T', 'Title', |
|
|
'U', 'Annotation', |
|
|
'V', 'Volume', |
|
|
'W', 'URL', |
|
|
'X', 'Abstract', |
|
|
'Y', 'Table of Contents', |
|
|
'Z', 'Reference', |
|
|
'$', 'Price', |
|
|
'*', 'Copyright', |
|
|
'^', 'Parts', |
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
# Field Display Order |
|
|
@default::FieldDisplayOrder = ( |
|
|
'ISBN', |
|
|
'700+', |
|
|
'200', |
|
|
'205', |
|
|
'210', |
|
|
'215', |
|
|
'225', |
|
|
'300+', |
|
|
'330', |
|
|
'423', |
|
|
'464', |
|
|
'610', |
|
|
'675+', |
|
|
'990', |
|
|
'991', |
|
|
'MFN', |
|
|
'994a', |
|
|
|
|
|
'M', |
|
|
'L', |
|
|
'T', |
|
|
'S', |
|
|
'E', |
|
|
'Q', |
|
|
'A', |
|
|
'J', |
|
|
'B', |
|
|
'D', |
|
|
'V', |
|
|
'N', |
|
|
'P', |
|
|
'C', |
|
|
'I', |
|
|
'G', |
|
|
'$', |
|
|
'K', |
|
|
'*', |
|
|
'W', |
|
|
'O', |
|
|
'Y', |
|
|
'X', |
|
|
'R', |
|
|
'.', |
|
|
'F', |
|
|
'H', |
|
|
'U', |
|
|
'Z', |
|
|
'^' |
|
|
); |
|
|
|
|
|
# separators |
|
|
%default::Separator = ( |
|
|
'700+', ', ', |
|
|
'990', ' ', |
|
|
'991', ', ', |
|
|
'300+', '.- ', |
|
|
'225', ', ', |
|
|
'610', ' * ', |
|
|
|
|
|
|
|
|
); |
|
|
|
|
37 |
#-------------------------------------------------------------------------- |
#-------------------------------------------------------------------------- |
38 |
# |
# |
39 |
# Function: DocumentParser() |
# Function: DocumentParser() |
129 |
# Loop over each line in the document list |
# Loop over each line in the document list |
130 |
foreach $FieldTag ( @default::FieldDisplayOrder ) { |
foreach $FieldTag ( @default::FieldDisplayOrder ) { |
131 |
|
|
132 |
|
# print "-- $FieldTag = $Document{$FieldTag} --"; |
133 |
|
|
134 |
# Skip empty slots |
# Skip empty slots |
135 |
if ( !(defined($Document{$FieldTag}) && ($Document{$FieldTag} ne "")) ) { |
if ( !(defined($Document{$FieldTag}) && ($Document{$FieldTag} ne "")) ) { |
136 |
next; |
next; |
140 |
# Print the row start |
# Print the row start |
141 |
$DocumentFinal .= "<TR><TD VALIGN=TOP ALIGN=RIGHT BGCOLOR=\"#EEEEEE\" WIDTH=\"130\"> $default::FieldNames{$FieldTag}: </TD><TD VALIGN=TOP ALIGN=LEFT> "; |
$DocumentFinal .= "<TR><TD VALIGN=TOP ALIGN=RIGHT BGCOLOR=\"#EEEEEE\" WIDTH=\"130\"> $default::FieldNames{$FieldTag}: </TD><TD VALIGN=TOP ALIGN=LEFT> "; |
142 |
|
|
143 |
|
sub html_enc { |
144 |
|
my $tmp = $_[0]; |
145 |
|
$tmp =~ s/&/∧/g; |
146 |
|
$tmp =~ s/</</g; |
147 |
|
$tmp =~ s/>/>/g; |
148 |
|
# fix some tags |
149 |
|
$tmp =~ s/<br>/<br>/gi; |
150 |
|
return $tmp; |
151 |
|
} |
152 |
|
|
153 |
|
$Document{$FieldTag} = html_enc($Document{$FieldTag}); |
154 |
|
|
155 |
# Print the field data, marking up if needed |
# Print the field data, marking up if needed |
156 |
if ( $FieldTag eq "A" || $FieldTag eq "E" ) { |
if ( $FieldTag eq "A" || $FieldTag eq "E" ) { |
157 |
$CommaFlag = 0; |
$CommaFlag = 0; |