diff options
author | cedricbonhomme <devnull@localhost> | 2010-05-03 22:20:34 +0200 |
---|---|---|
committer | cedricbonhomme <devnull@localhost> | 2010-05-03 22:20:34 +0200 |
commit | 2beb7b13fbddeba01fa89ab4f26904ceea2ecf75 (patch) | |
tree | a55245506bd029d5db31a91dbc1add345cac4e72 /pyAggr3g470r.py | |
parent | Added export function. (diff) | |
download | newspipe-2beb7b13fbddeba01fa89ab4f26904ceea2ecf75.tar.gz newspipe-2beb7b13fbddeba01fa89ab4f26904ceea2ecf75.tar.bz2 newspipe-2beb7b13fbddeba01fa89ab4f26904ceea2ecf75.zip |
Improvements (HTML export)
Diffstat (limited to 'pyAggr3g470r.py')
-rwxr-xr-x | pyAggr3g470r.py | 7 |
1 files 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 += "<hr />\n" + content += htmlfooter elif export_method == "export_TXT": f = open(folder + "/" + article[2], "w") content = utils.remove_html_tags(article[4].encode('utf-8')) |