aboutsummaryrefslogtreecommitdiff
path: root/source/epub/ez_epub.py
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel@gmail.com>2013-10-13 10:02:46 +0200
committerCédric Bonhomme <kimble.mandel@gmail.com>2013-10-13 10:02:46 +0200
commit0a537520565306301b2efcffcfb0e4c19dc6d9a5 (patch)
treed565b46b7c904a37ee772a7092cfcc4a0eb869a3 /source/epub/ez_epub.py
parentRemoved Sphinx documentation. (diff)
downloadnewspipe-0a537520565306301b2efcffcfb0e4c19dc6d9a5.tar.gz
newspipe-0a537520565306301b2efcffcfb0e4c19dc6d9a5.tar.bz2
newspipe-0a537520565306301b2efcffcfb0e4c19dc6d9a5.zip
Removed epub module.
Diffstat (limited to 'source/epub/ez_epub.py')
-rw-r--r--source/epub/ez_epub.py36
1 files changed, 0 insertions, 36 deletions
diff --git a/source/epub/ez_epub.py b/source/epub/ez_epub.py
deleted file mode 100644
index ecfd4f5a..00000000
--- a/source/epub/ez_epub.py
+++ /dev/null
@@ -1,36 +0,0 @@
-#! /usr/local/bin/python
-#-*- coding: utf-8 -*-
-
-import epub
-from genshi.template import TemplateLoader
-
-class Section:
- def __init__(self):
- self.title = ''
- self.paragraphs = []
- self.tocDepth = 1
-
-def makeBook(title, authors, sections, outputDir, lang='en-US', cover=None):
- book = epub.EpubBook()
- book.setLang(lang)
- book.setTitle(title)
- for author in authors:
- book.addCreator(author)
- #book.addTitlePage()
- #book.addTocPage()
- #if cover:
- #book.addCover(cover)
-
- loader = TemplateLoader('./epub/templates')
- tmpl = loader.load('ez-section.html')
-
- for i, section in enumerate(sections):
- stream = tmpl.generate(section = section)
- html = stream.render('xhtml', doctype='xhtml11', drop_xml_decl=False)
- item = book.addHtml('', 's%d.html' % (i + 1), html)
- book.addSpineItem(item)
- book.addTocMapNode(item.destPath, section.title, section.tocDepth)
-
- outputFile = outputDir + 'article.epub'
- book.createBook(outputDir)
- book.createArchive(outputDir, outputFile) \ No newline at end of file
bgstack15