aboutsummaryrefslogtreecommitdiff
path: root/pyAggr3g470r.py
diff options
context:
space:
mode:
authorcedricbonhomme <devnull@localhost>2010-12-03 08:23:04 +0100
committercedricbonhomme <devnull@localhost>2010-12-03 08:23:04 +0100
commitfd1e4060ebfe5f8932aefe855e96a05cbc5626da (patch)
treee2b08d3659cf8607f9d4eda36ef95b7d87cffec5 /pyAggr3g470r.py
parentUpdated code for new data structure. #5 (diff)
downloadnewspipe-fd1e4060ebfe5f8932aefe855e96a05cbc5626da.tar.gz
newspipe-fd1e4060ebfe5f8932aefe855e96a05cbc5626da.tar.bz2
newspipe-fd1e4060ebfe5f8932aefe855e96a05cbc5626da.zip
Updated code for new data structure. #6
Diffstat (limited to 'pyAggr3g470r.py')
-rwxr-xr-xpyAggr3g470r.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/pyAggr3g470r.py b/pyAggr3g470r.py
index e5f0cd98..79d204f3 100755
--- a/pyAggr3g470r.py
+++ b/pyAggr3g470r.py
@@ -258,12 +258,12 @@ class Root:
html += """<form method=get action="/add_feed/"><input type="url" name="url" placeholder="URL of a site" maxlength=2048 autocomplete="off">\n<input
type="submit" value="OK"></form>\n"""
- if self.articles:
+ if self.feeds:
html += "<h1>Delete Feeds</h1>\n"
html += """<form method=get action="/remove_feed/"><select name="feed_id">\n"""
- for feed_id in self.feeds.keys():
+ for feed in self.feeds.values():
html += """\t<option value="%s">%s</option>\n""" % \
- (feed_id, feed.feed_title.encode('utf-8'))
+ (feed.feed_id, feed.feed_title.encode('utf-8'))
html += """</select><input type="submit" value="OK"></form>\n"""
html += """<p>Active e-mail notifications: <a href="/notifications/">%s</a></p>\n""" % \
(self.nb_mail_notifications,)
@@ -291,8 +291,8 @@ class Root:
html += "<hr />\n\n"
# Some statistics
- if self.articles:
- self.top_words = utils.top_words(self.articles, n=50, size=int(word_size))
+ if self.feeds:
+ self.top_words = utils.top_words(self.feeds, n=50, size=int(word_size))
html += "<h1>Statistics</h1>\n<br />\n"
# Tags cloud
html += 'Minimum size of a word:'
bgstack15