--- trunk/lib/WebPAC/Input/ISI.pm 2009/05/29 21:41:37 1208 +++ trunk/lib/WebPAC/Input/ISI.pm 2009/05/30 14:21:58 1209 @@ -12,13 +12,9 @@ WebPAC::Input::ISI - support for ISI Export Format -=head1 VERSION - -Version 0.02 - =cut -our $VERSION = '0.02'; +our $VERSION = '0.03'; =head1 SYNOPSIS @@ -60,7 +56,7 @@ my $full_cr = shift; my @v = split(/, /, $full_cr); my $f = { full => $full_cr }; - foreach ( qw/author year reference volume page/ ) { + foreach ( qw/author year reference volume page doi/ ) { if ( my $tmp = shift @v ) { $f->{$_} = $tmp; } @@ -69,6 +65,7 @@ delete $f->{author}; $f->{institution} = $1; } + $f->{doi} =~ s{DOI\s+}{} if $f->{doi}; # strip DOI prefix return $f; }, }; @@ -119,6 +116,12 @@ $v = $2; } elsif ( $line =~ /^\s{3}(.+)$/ ) { $v = $1; + if ( $tag eq 'CR' && $v =~ m{DOI$} ) { + my $doi = <$fh>; + chomp($doi); + $doi =~ s{^\s{3}}{ } || die "can't find DOI in: $doi"; + $v .= $doi; + } } elsif ( $line eq 'ER' ) { # join tags foreach ( qw/AB DE ID TI/ ) {