$file .= $1 if $full_path =~ m/(\.\w+)$/;
}
+ my $subject;
+ if ( $file =~ m/^(\d+)(\w+)$/ ) {
+ $subject =
+ $2 =~ m/bib/i ? 'IZBIB' :
+ $2 =~ m/[info]{4}/i ? 'IZDHI' :
+ $2 =~ m/muz/i ? 'IZMUZ' :
+ $2 =~ m/arh/i ? 'IZARH' :
+ die "unknown subject: $2";
+ }
+
my $c = $col;
$header2col->{'eprintsid'} = $c; $v[$c++] = $eprintsid++;
$header2col->{'file'} = $c; $v[$c++] = $file;
$header2col->{'full_path'} = $c; $v[$c++] = $full_path;
+ $header2col->{'subject'} = $c; $v[$c++] = $subject;
my $eprints = $xml;
while ( $eprints =~ s/<!-- "(.+?)" -->/interpolate($1)/seg ) {
}
$eprints =~ s{<documents>.+</documents>}{<!-- no documents -->}s if ! $full_path;
+ $eprints =~ s{<subjects>.+</subjects>}{<!-- no subjects -->}s if ! $subject;
print $eprints;
}