From 27c39efff4ea31cd423abbe5b21cfc661948c6f5 Mon Sep 17 00:00:00 2001 From: cedricbonhomme Date: Tue, 7 Dec 2010 18:22:44 +0100 Subject: Better display of article's content. --- epub/epub.py | 6 ------ pyAggr3g470r.py | 8 ++++---- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/epub/epub.py b/epub/epub.py index 16deaf1f..33193295 100644 --- a/epub/epub.py +++ b/epub/epub.py @@ -275,10 +275,6 @@ class EpubBook: fout.close() os.chdir(cwd) - @staticmethod - def checkEpub(checkerPath, epubPath): - subprocess.call(['java', '-jar', checkerPath, epubPath], shell = True) - def createBook(self, rootDir): if self.titlePage: self.__makeTitlePage() @@ -292,7 +288,6 @@ class EpubBook: self.__writeContentOPF() self.__writeTocNCX() - def test(): def getMinimalHtml(text): return """ @@ -343,7 +338,6 @@ def test(): rootDir = r'd:\epub\test' book.createBook(rootDir) EpubBook.createArchive(rootDir, rootDir + '.epub') - #EpubBook.checkEpub('epubcheck-1.0.5.jar', rootDir + '.epub') if __name__ == '__main__': test() \ No newline at end of file diff --git a/pyAggr3g470r.py b/pyAggr3g470r.py index 1720f1d5..096797ca 100755 --- a/pyAggr3g470r.py +++ b/pyAggr3g470r.py @@ -416,7 +416,7 @@ class Root: self.error_page("This article do not exists.") html = htmlheader() html += htmlnav - html += """
""" + html += """
""" # Generation of the QR Code for the current article try: os.makedirs("./var/qrcode/") @@ -455,9 +455,9 @@ class Root: # Description (full content) of the article description = article.article_description if description: - html += description + "\n

" + html += description + "\n


" else: - html += "No description available.\n

" + html += "No description available.\n


" # Previous and following articles try: @@ -1111,7 +1111,7 @@ class Root: section.title = article.article_title.decode('utf-8') section.paragraphs = [utils.clear_string(article.article_description).decode('utf-8')] ez_epub.makeBook(article.article_title.decode('utf-8'), [feed.feed_title.decode('utf-8')], [section], \ - os.path.normpath(folder + "article"), lang='en-US', cover=None) + os.path.normpath(folder) + "article.epub", lang='en-US', cover=None) return self.article(param) epub.exposed = True -- cgit