aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel@gmail.com>2013-01-19 11:44:36 +0100
committerCédric Bonhomme <kimble.mandel@gmail.com>2013-01-19 11:44:36 +0100
commitd03f5ed7c83885ad4bc8482b44ec5b3a7120b7a6 (patch)
tree0ea58d9bf3ff3dad2821578ade043ad70aacd88f /source
parentA simple CSS has been added for the webzine. (diff)
downloadnewspipe-d03f5ed7c83885ad4bc8482b44ec5b3a7120b7a6.tar.gz
newspipe-d03f5ed7c83885ad4bc8482b44ec5b3a7120b7a6.tar.bz2
newspipe-d03f5ed7c83885ad4bc8482b44ec5b3a7120b7a6.zip
Minor improvements of the generation of pages for the webzine.
Diffstat (limited to 'source')
-rw-r--r--source/export.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/export.py b/source/export.py
index cfbdec5c..95b56b6b 100644
--- a/source/export.py
+++ b/source/export.py
@@ -63,7 +63,7 @@ htmlheader = """<!DOCTYPE html>
</style>
</head>"""
-htmlfooter = '<hr />\n<p>This software is under GPLv3 license. You are welcome to copy, modify or' + \
+htmlfooter = '\n<hr />\n<p>This software is under GPLv3 license. You are welcome to copy, modify or' + \
' redistribute the source code according to the' + \
' <a href="http://www.gnu.org/licenses/gpl-3.0.txt">GPLv3</a> license.</p></div>\n' + \
'</body>\n</html>'
@@ -75,7 +75,8 @@ def export_html(mongo_db):
nb_articles = format(mongo_db.nb_articles(), ",d")
feeds = mongo_db.get_all_feeds()
index = htmlheader
- index += "\n<h1>List of feeds</h1>\n<ul>"
+ index += "\n<h1>List of feeds</h1>\n"
+ index += """<p>%s articles.</p>\n<ul>\n""" % (nb_articles,)
for feed in feeds:
# creates a folder for each stream
feed_folder = conf.path + "/var/export/webzine/" + \
@@ -109,7 +110,7 @@ def export_html(mongo_db):
a_post += article["article_content"]
a_post += "</div>\n<hr />\n"
a_post += """<br />\n<a href="%s">Complete story</a>\n<br />\n""" % (article["article_link"],)
- a_post += "<hr />\n" + htmlfooter
+ a_post += htmlfooter
with open(post_file_name, "w") as f:
f.write(a_post)
@@ -119,7 +120,6 @@ def export_html(mongo_db):
f.write(posts)
index += "\n</ul>\n<br />\n"
- index += """<p>Total: %s articles.</p>\n""" % (nb_articles,)
index += htmlfooter
with open(conf.path + "/var/export/webzine/" + "index.html", "w") as f:
f.write(index)
bgstack15