diff --git a/epub.php b/epub.php
index d2580cf..2c89575 100644
--- a/epub.php
+++ b/epub.php
@@ -136,7 +136,47 @@
$articleurl = str_replace('material', 'article/' . $entry->hash . '.json', $url);
$articlejson = file_get_contents($articleurl);
$article = json_decode($articlejson);
- $epub->AddPage($article->title, false, $article->title);
+
+ $content = '
' . $article->title . '
';
+ $content .= '' . $article->abstract . '';
+
+ if (count($article->rubrics))
+ {
+ $content .= 'Rubriques: ' . implode(',', $article->rubrics) . '
';
+ }
+ if (count($article->authors))
+ {
+ $content .= 'Auteurs: ' . implode(',', $article->authors) . '
';
+ }
+
+ foreach ($article->content->sections as $section)
+ {
+ foreach ($section->items as $item)
+ {
+ if ($item->type == 'text')
+ {
+ if ($item->class == 'quote')
+ {
+ $content .= '' .$item->content . '
';
+ }
+ else if ($item->class == 'paragraphTitle')
+ {
+ $content .= '' .$item->content . '
';
+ }
+ else
+ {
+ $content .= '' .$item->content . '
';
+ }
+ }
+ }
+ }
+
+ /*if ($article->imageUrl)
+ {
+ $epub->AddPage('
', false, 'Page ' . $article->page, true);
+ }*/
+ $epub->AddPage($content, false, $article->title);
+
}
write_epub($epub);
}