my $doc = odfDocument(file => $odt_file, create => 'text');
my $stat;
-my $id2nr;
+my $abstracts;
$doc->createStyle(
"Abstract",
family => 'paragraph',
- parent => 'Default Style',
- category => 'auto',
+ parent => 'Standard',
+# category => 'auto',
properties => {
-area => 'paragraph',
'fo:text-align' => 'justify'
warn "# $id abstract = ", dump($abstract);
foreach my $k (qw( ContributionType )) {
- $stat->{$k}->{ $abstract->{$k}->[0] } ++;
+ push @{ $stat->{$k}->{ $abstract->{$k}->[0] } }, $id;
}
if ( my $s = $abstract->{Symposium_title} ) {
push @{ $stat->{_symposium}->{$s} }, $id;
}
- my $f = $abstract->{field};
-
- push @{ $stat->{_symposium}->{ $f->{1}->{'content'} } }, $id if exists $f->{1}->{content};
- push @{ $stat->{_theme}->{ $f->{2}->{'content'} } }, $id if exists $f->{2}->{content};
-
- $stat->{field}->{ $_ }++ foreach keys %$f;
-
- $id2nr->{ $id } = $nr++;
+ $abstracts->{ $id } = $abstract;
}
warn "# stat = ",dump($stat);
-__END__
+sub abstract2doc {
+ my $id = shift;
-warn "$nr";
+ my $abstract = $abstracts->{$id} || die "no $id in abstracts ",dump($abstracts);
my $t = $doc->appendParagraph(text => $abstract->{Title}->[0], style => 'Heading 1');
$doc->setPageBreak( $t, position => 'before', style => 'Heading 1');
$doc->appendParagraph(text => "\nID: " . $abstract->{Id}->[0], style => 'Abstract');
+
+ warn "# added $id to document\n";
+}
+
+foreach my $id ( keys %$abstracts ) {
+ abstract2doc($id);
}
warn "# stat = ",dump($stat);