ADD: added support for papers in book and collections

This commit is contained in:
Dominik Meyer 2017-06-20 08:52:16 +02:00
parent e4ee147fab
commit 95b3159ed2

View File

@ -19,7 +19,9 @@ my $type_map = {
'article' => 'Journal', 'article' => 'Journal',
'misc' => 'Misc', 'misc' => 'Misc',
'mastersthesis' => 'Diploma Thesis', 'mastersthesis' => 'Diploma Thesis',
'unpublished' => 'Unpublished' 'unpublished' => 'Unpublished',
'inbook' => 'Chapter in Book',
'incollection' => 'Paper Collection'
}; };
sub generate { sub generate {
@ -69,7 +71,22 @@ sub generate {
if (defined($entry->get('address')) && length($entry->get('address'))>0) { if (defined($entry->get('address')) && length($entry->get('address'))>0) {
$pub{title}.="," . $entry->get('address'); $pub{title}.="," . $entry->get('address');
} }
}else { } elsif($entry->type eq "inbook") {
$pub{title} = "Chap: " . $entry->get('chapter') . ", Book: " . $entry->get('title');
$pub{title} .= ", Editor: " . $entry->get('editor') unless !defined($entry->get('editor'));
$pub{title} .= ", " . $entry->get('publisher') unless !defined($entry->get('publisher'));
} elsif($entry->type eq "incollection") {
$pub{title} = $entry->get('title') .", " . $entry->get('booktitle');
$pub{title} .= " Vol. " . $entry->get('volume') unless !defined($entry->get('volume'));
$pub{title} .= ", Editor: " . $entry->get('editor') unless !defined($entry->get('editor'));
$pub{title} .= ", " . $entry->get('publisher') unless !defined($entry->get('publisher'));
} elsif($entry->type eq "article") {
$pub{title} = $entry->get('title') .", " . $entry->get('journal');
$pub{title} .= " Issue " . $entry->get('number') unless !defined($entry->get('number'));
$pub{title} .= " Vol. " . $entry->get('volume') unless !defined($entry->get('volume'));
$pub{title} .= ", " . $entry->get('publisher') unless !defined($entry->get('publisher'));
}
else {
$pub{title}=$entry->get('title'); $pub{title}=$entry->get('title');
} }
$pub{year}=$entry->get('year'); $pub{year}=$entry->get('year');