aboutsummaryrefslogtreecommitdiff
path: root/pyAggr3g470r.py
diff options
context:
space:
mode:
authorcedricbonhomme <devnull@localhost>2011-06-06 21:58:56 +0200
committercedricbonhomme <devnull@localhost>2011-06-06 21:58:56 +0200
commit6167b131e738bc347e86f1424ca801a2f39a091c (patch)
treec510560c3a55b61d8a47f97e7358dc00a6aaf946 /pyAggr3g470r.py
parentAdded more informations about a feed in the 'feed summary' page. (diff)
downloadnewspipe-6167b131e738bc347e86f1424ca801a2f39a091c.tar.gz
newspipe-6167b131e738bc347e86f1424ca801a2f39a091c.tar.bz2
newspipe-6167b131e738bc347e86f1424ca801a2f39a091c.zip
Improvement. Daily post average.
Diffstat (limited to 'pyAggr3g470r.py')
-rwxr-xr-xpyAggr3g470r.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pyAggr3g470r.py b/pyAggr3g470r.py
index fcbc058a..824b6d2d 100755
--- a/pyAggr3g470r.py
+++ b/pyAggr3g470r.py
@@ -569,7 +569,7 @@ class Root:
delta = last_article - first_article
delta_today = datetime.datetime.fromordinal(datetime.date.today().toordinal()) - last_article
html += "<p>The last article was posted " + str(abs(delta_today.days)) + " day(s) ago.</p>"
- html += """<p>Daily average: %s,""" % (str(abs(delta.days)/feed.nb_articles),)
+ html += """<p>Daily average: %s,""" % (str(round(float(feed.nb_articles)/abs(delta.days), 2)),)
html += """ between the %s and the %s.</p>\n""" % \
(feed.articles.values()[-1].article_date[:10], feed.articles.values()[0].article_date[:10])
bgstack15