From b6445a31fee14f6935ddc2cde7ec3ff2e31ea161 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Sun, 20 Jan 2013 12:31:12 +0100 Subject: You can now fetch only one feed. --- source/pyAggr3g470r.py | 8 ++++++-- source/templates/index.html | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/source/pyAggr3g470r.py b/source/pyAggr3g470r.py index d99ab122..2120a171 100755 --- a/source/pyAggr3g470r.py +++ b/source/pyAggr3g470r.py @@ -172,12 +172,16 @@ class pyAggr3g470r(object): search.exposed = True @auth.require() - def fetch(self): + def fetch(self, param=None): """ Fetch all feeds. """ + feed_link = None + if None != param: + # Fetch only the feed specified in parameter + feed_link = self.mongo.get_feed(param)["feed_link"] feed_getter = feedgetter.FeedGetter() - feed_getter.retrieve_feed() + feed_getter.retrieve_feed(feed_url=feed_link) return self.index() fetch.exposed = True diff --git a/source/templates/index.html b/source/templates/index.html index 9539f4dc..66f301e6 100644 --- a/source/templates/index.html +++ b/source/templates/index.html @@ -42,7 +42,7 @@ import utils %endif %endif - +       
@@ -94,6 +94,7 @@ import utils # some options for the current feed html += """All articles   """ % (feed["feed_id"],) html += """Feed summary   """ % (feed["feed_id"],) + html += """

\n""" % (feed["feed_id"],) if mongo.nb_unread_articles(feed["feed_id"]) != 0: html += """  Mark all as read""" % (feed["feed_id"],) html += """     Unread article(s) (%s)""" % (feed["feed_id"], mongo.nb_unread_articles(feed["feed_id"])) -- cgit