aboutsummaryrefslogtreecommitdiff
path: root/epub/templates/content.opf
diff options
context:
space:
mode:
authorcedricbonhomme <devnull@localhost>2010-11-23 22:13:32 +0100
committercedricbonhomme <devnull@localhost>2010-11-23 22:13:32 +0100
commit0ce90a043eef532a71952e6aac43e6be6affc0f0 (patch)
tree1adaa7e3ff72891223705a0bafa978f74d3d3984 /epub/templates/content.opf
parentImprovement of the search results (ToolTips, display). (diff)
downloadnewspipe-0ce90a043eef532a71952e6aac43e6be6affc0f0.tar.gz
newspipe-0ce90a043eef532a71952e6aac43e6be6affc0f0.tar.bz2
newspipe-0ce90a043eef532a71952e6aac43e6be6affc0f0.zip
Added import to EPUB function.
Diffstat (limited to 'epub/templates/content.opf')
-rw-r--r--epub/templates/content.opf34
1 files changed, 34 insertions, 0 deletions
diff --git a/epub/templates/content.opf b/epub/templates/content.opf
new file mode 100644
index 00000000..67f3f5c6
--- /dev/null
+++ b/epub/templates/content.opf
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<opf:package xmlns:opf="http://www.idpf.org/2007/opf"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:py="http://genshi.edgewall.org/"
+ unique-identifier="bookid" version="2.0">
+ <opf:metadata >
+ <dc:identifier id="bookid">urn:uuid:${book.UUID}</dc:identifier>
+ <dc:language>${book.lang}</dc:language>
+ <dc:title>${book.title}</dc:title>
+ <py:for each="name, role in book.creators">
+ <dc:creator opf:role="$role">$name</dc:creator>
+ </py:for>
+ <py:for each="beginTag, content, endTag in book.getMetaTags()">
+ ${Markup(beginTag)}$content${Markup(endTag)}
+ </py:for>
+ <opf:meta name="cover" content="${book.coverImage.id}" py:if="book.coverImage"/>
+ </opf:metadata>
+ <opf:manifest>
+ <opf:item id="ncxtoc" media-type="application/x-dtbncx+xml" href="toc.ncx"/>
+ <py:for each="item in book.getAllItems()">
+ <opf:item id="${item.id}" media-type="${item.mimeType}" href="${item.destPath}"/>
+ </py:for>
+ </opf:manifest>
+ <opf:spine toc="ncxtoc">
+ <py:for each="_, item, linear in book.getSpine()">
+ <opf:itemref idref="${item.id}" linear="${'yes' if linear else 'no'}"/>
+ </py:for>
+ </opf:spine>
+ <opf:guide py:if="book.guide">
+ <py:for each="href, title, type in book.getGuide()">
+ <opf:reference href="$href" type="$type" title="$title"/>
+ </py:for>
+ </opf:guide>
+</opf:package>
bgstack15