From c5b34630166a008ea63079277009d907dc2c1741 Mon Sep 17 00:00:00 2001 From: cedricbonhomme Date: Mon, 13 Jun 2011 15:21:05 +0200 Subject: Minor bugfix: activity of a feed (average articles poster per day) --- pyAggr3g470r.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 += "

The last article was posted " + str(abs(delta_today.days) - 1) + " day(s) ago.

" + html += "

The last article was posted " + str(abs(delta_today.days)) + " day(s) ago.

" if delta.days > 0: html += """

Daily average: %s,""" % (str(round(float(feed.nb_articles)/abs(delta.days), 2)),) html += """ between the %s and the %s.

\n""" % \ -- cgit