aboutsummaryrefslogtreecommitdiff
path: root/pyAggr3g470r.py
diff options
context:
space:
mode:
authorcedricbonhomme <devnull@localhost>2011-06-13 15:21:05 +0200
committercedricbonhomme <devnull@localhost>2011-06-13 15:21:05 +0200
commitc5b34630166a008ea63079277009d907dc2c1741 (patch)
tree11c2c4f0f280757581c8f5fc3d7b54e16d8c827c /pyAggr3g470r.py
parentMinor bugfix: articles must be sorted before the selection of article to load. (diff)
downloadnewspipe-c5b34630166a008ea63079277009d907dc2c1741.tar.gz
newspipe-c5b34630166a008ea63079277009d907dc2c1741.tar.bz2
newspipe-c5b34630166a008ea63079277009d907dc2c1741.zip
Minor bugfix: activity of a feed (average articles poster per day)
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 df1c0d23..5cc45789 100755
--- a/pyAggr3g470r.py
+++ b/pyAggr3g470r.py
@@ -578,7 +578,7 @@ class Root:
first_article = utils.string_to_datetime(feed.articles.values()[-1].article_date)
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) - 1) + " day(s) ago.</p>"
+ html += "<p>The last article was posted " + str(abs(delta_today.days)) + " day(s) ago.</p>"
if delta.days > 0:
html += """<p>Daily average: %s,""" % (str(round(float(feed.nb_articles)/abs(delta.days), 2)),)
html += """ between the %s and the %s.</p>\n""" % \
bgstack15