iPaperの出力をbioinformatics reference形式に変換
こいつを使ってリジェクト食らっても責任持てません :)
refcvs2html
#!/usr/bin/perlprint << "EOF";
<html>
<head>
<title>ref html</title>
</head>
<body>
EOF
while(<>){
chomp;
next if($_ eq '');
my ($authors, $title, $else) = split /¥", ¥"/, $_;
$authors =‾ s/^¥"//g;
my ($journal, $year, $volume, $void, $pages) = split /, /, $else;
$journal =‾ s/¥"$//g;
my @author = split /, /, $authors;
my $ret_author = undef;
if(!exists $author[2]){
$ret_author = "$author[0],$author[1]."
}elsif(!exists $author[4]){
$ret_author = "$author[0],$author[1]. and $author[2],$author[3].";
}else{
$ret_author = "$author[0],$author[1]. <i>et al</i>.";
}
print <<"EOF";
$ret_author ($year) $title <I>$journal</I>, <B>$volume</B>, $pages<br>
EOF
}
print << "EOF";
</body>
</html>
EOF
upしてからちょっとマズい所をいくつか書き直しました。
コメント (2)
まちがいまくってたくせに.
えらそうな.
投稿者: NZM | 2006年09月18日 01:20
あ、ページとJounal略称か。
それはNCBI MEDLINEに文句言って下さいよう。て言うか、すいません。
投稿者: negipo | 2006年09月18日 02:18