about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPaweł Jastrzębski <pawelj@iosphe.re>2015-03-17 11:02:28 +0100
committerPaweł Jastrzębski <pawelj@iosphe.re>2015-03-17 11:02:28 +0100
commit1aa34347c1da83e45edfc87e00cc3ba946e1114b (patch)
treed7b47462be0f4cae7fb64d2c59441cd7fc97eb20
parentUpdated README and Setup (diff)
downloadkcc-1aa34347c1da83e45edfc87e00cc3ba946e1114b.tar.gz
kcc-1aa34347c1da83e45edfc87e00cc3ba946e1114b.tar.bz2
kcc-1aa34347c1da83e45edfc87e00cc3ba946e1114b.zip
Added page-progression-direction tag to EPUB spine
-rwxr-xr-xkcc/comic2ebook.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/kcc/comic2ebook.py b/kcc/comic2ebook.py
index 7b5f725..1ea3e4b 100755
--- a/kcc/comic2ebook.py
+++ b/kcc/comic2ebook.py
@@ -293,7 +293,10 @@ def buildOPF(dstdir, title, filelist, cover=None):
         f.write("<item id=\"img_" + str(uniqueid) + "\" href=\"" + folder + "/" + path[1] + "\" media-type=\""
                 + mt + "\"/>\n")
     f.write("<item id=\"css\" href=\"Text/style.css\" media-type=\"text/css\"/>\n")
-    f.write("</manifest>\n<spine toc=\"ncx\">\n")
+    if options.righttoleft:
+        f.write("</manifest>\n<spine page-progression-direction=\"rtl\" toc=\"ncx\">\n")
+    else:
+        f.write("</manifest>\n<spine page-progression-direction=\"ltr\" toc=\"ncx\">\n")
     for entry in reflist:
         f.write("<itemref idref=\"page_" + entry + "\"/>\n")
     f.write("</spine>\n<guide>\n</guide>\n</package>\n")