aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel@gmail.com>2013-01-20 12:31:12 +0100
committerCédric Bonhomme <kimble.mandel@gmail.com>2013-01-20 12:31:12 +0100
commitb6445a31fee14f6935ddc2cde7ec3ff2e31ea161 (patch)
tree934fdeb61f193193130c95169d35b433c7f4c06d /source
parentMinor bugfix in index.html template: feed['mail'] == True if mail notificatio... (diff)
downloadnewspipe-b6445a31fee14f6935ddc2cde7ec3ff2e31ea161.tar.gz
newspipe-b6445a31fee14f6935ddc2cde7ec3ff2e31ea161.tar.bz2
newspipe-b6445a31fee14f6935ddc2cde7ec3ff2e31ea161.zip
You can now fetch only one feed.
Diffstat (limited to 'source')
-rwxr-xr-xsource/pyAggr3g470r.py8
-rw-r--r--source/templates/index.html3
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>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<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>&nbsp;&nbsp;&nbsp;""" % (feed["feed_id"],)
html += """<a href="/feed/%s">Feed summary</a>&nbsp;&nbsp;&nbsp;""" % (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 += """&nbsp;&nbsp;<a href="/mark_as_read/Feed_FromMainPage:%s">Mark all as read</a>""" % (feed["feed_id"],)
html += """&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="/unread/%s" title="Unread article(s)">Unread article(s) (%s)</a>""" % (feed["feed_id"], mongo.nb_unread_articles(feed["feed_id"]))
bgstack15