From 2beb7b13fbddeba01fa89ab4f26904ceea2ecf75 Mon Sep 17 00:00:00 2001 From: cedricbonhomme Date: Mon, 3 May 2010 22:20:34 +0200 Subject: Improvements (HTML export) --- pyAggr3g470r.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pyAggr3g470r.py b/pyAggr3g470r.py index fec8db74..d85ca521 100755 --- a/pyAggr3g470r.py +++ b/pyAggr3g470r.py @@ -752,7 +752,7 @@ class Root: Export articles stored in the SQLite database in a text files. """ for rss_feed_id in self.feeds.keys(): - folder = "./var/export/" + self.feeds[rss_feed_id][3] + folder = utils.path + "var/export/" + self.feeds[rss_feed_id][3] try: os.makedirs(folder) except OSError: @@ -761,7 +761,10 @@ class Root: try: if export_method == "export_HTML": f = open(folder + "/" + article[2]+ ".html", "w") - content = article[4].encode('utf-8') + content = htmlheader + content += article[4].encode('utf-8') + content += "
\n" + content += htmlfooter elif export_method == "export_TXT": f = open(folder + "/" + article[2], "w") content = utils.remove_html_tags(article[4].encode('utf-8')) -- cgit