diff options
author | cedricbonhomme <devnull@localhost> | 2010-09-06 19:07:35 +0200 |
---|---|---|
committer | cedricbonhomme <devnull@localhost> | 2010-09-06 19:07:35 +0200 |
commit | efeb70606dc9dd0ca1e2250ad8dfd4010801d5e3 (patch) | |
tree | 59a80b147059ea8e5e4ab411b264812b2b3cdf47 /pyAggr3g470r.py | |
parent | Release 2.0. Improvement of the research page, history research. (diff) | |
download | newspipe-efeb70606dc9dd0ca1e2250ad8dfd4010801d5e3.tar.gz newspipe-efeb70606dc9dd0ca1e2250ad8dfd4010801d5e3.tar.bz2 newspipe-efeb70606dc9dd0ca1e2250ad8dfd4010801d5e3.zip |
Minor improvement of the page of unread articles.
Diffstat (limited to 'pyAggr3g470r.py')
-rwxr-xr-x | pyAggr3g470r.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pyAggr3g470r.py b/pyAggr3g470r.py index 7a493aaf..f49e806c 100755 --- a/pyAggr3g470r.py +++ b/pyAggr3g470r.py @@ -529,8 +529,10 @@ class Root: html += "<h1>Unread article(s)</h1>" for rss_feed_id in self.feeds.keys(): new_feed_section = True + nb_unread = 0 for article in self.articles[rss_feed_id]: if article[5] == "0": + nb_unread += 1 if new_feed_section is True: new_feed_section = False html += """<h2><a name="%s"><a href="%s" rel="noreferrer" @@ -547,6 +549,10 @@ class Root: """ - <a href="/description/%s:%s" rel="noreferrer" target="_blank">%s</a><br />\n""" % \ (rss_feed_id, article[0].encode('utf-8'), \ article[2].encode('utf-8')) + + if nb_unread == self.feeds[rss_feed_id][1]: + html += """<br /><a href="/mark_as_read/Feed:%s">Mark all articles from this feed as read</a>""" % \ + (rss_feed_id,) html += """<hr />\n<a href="/mark_as_read/All:">Mark articles as read</a>\n""" else: try: |