diff options
-rwxr-xr-x | source/pyAggr3g470r.py | 8 | ||||
-rw-r--r-- | 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 <a href="/unread/"><img src="/img/unread.png" title="Unread article(s): ${nb_unread_articles}" /></a> %endif %endif - <a accesskey="F" href="/fetch/"><img src="/img/check-news.png" title="Check for news" /></a> + <a href="/fetch/"><img src="/img/check-news.png" title="Check for news" /></a> <a href="/logout/"><img src="/img/logout.png" title="Logout" /></a> </div><br/> @@ -94,6 +94,7 @@ import utils # some options for the current feed html += """<a href="/articles/%s">All articles</a> """ % (feed["feed_id"],) html += """<a href="/feed/%s">Feed summary</a> """ % (feed["feed_id"],) + html += """<div class="right"><h2><a href="/fetch/%s"><img src="/img/check-news.png" title="Check this feed for news" /></a></h2></div>\n""" % (feed["feed_id"],) if mongo.nb_unread_articles(feed["feed_id"]) != 0: html += """ <a href="/mark_as_read/Feed_FromMainPage:%s">Mark all as read</a>""" % (feed["feed_id"],) html += """ <a href="/unread/%s" title="Unread article(s)">Unread article(s) (%s)</a>""" % (feed["feed_id"], mongo.nb_unread_articles(feed["feed_id"])) |