diff options
author | cedricbonhomme <devnull@localhost> | 2010-06-10 09:12:54 +0200 |
---|---|---|
committer | cedricbonhomme <devnull@localhost> | 2010-06-10 09:12:54 +0200 |
commit | e6bbb708cde59b3f32b69e50f6312652332f3a83 (patch) | |
tree | 786593b6a74313141329f41dd73d87b39d5aac81 /pyAggr3g470r.py | |
parent | Removed xkcd (diff) | |
download | newspipe-e6bbb708cde59b3f32b69e50f6312652332f3a83.tar.gz newspipe-e6bbb708cde59b3f32b69e50f6312652332f3a83.tar.bz2 newspipe-e6bbb708cde59b3f32b69e50f6312652332f3a83.zip |
Remove a feed from the file feed.lst. Some improvements.
Diffstat (limited to 'pyAggr3g470r.py')
-rwxr-xr-x | pyAggr3g470r.py | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/pyAggr3g470r.py b/pyAggr3g470r.py index 85b3cee1..c5eb9b6a 100755 --- a/pyAggr3g470r.py +++ b/pyAggr3g470r.py @@ -187,11 +187,11 @@ class Root: if self.articles: html += "<h1>Delete Feeds</h1>\n" - html += """<form method=get action="del_feed/"><select name="feed_list">\n""" + html += """<form method=get action="/remove_feed/"><select name="url">\n""" for feed_id in self.articles.keys(): html += """\t<option value="%s">%s</option>\n""" % \ (feed_id, self.feeds[feed_id][3].encode('utf-8')) - html += """</select></form>\n""" + html += """</select><input type="submit" value="OK"></form>\n""" html += """<p>Active e-mail notifications: <a href="/list_notification">%s</a></p>\n""" % \ (len([feed for feed in self.feeds.values() if feed[6] == "1"]),) html += """<p>You like <a href="/list_favorites/">%s</a> article(s).</p>\n""" % \ @@ -773,6 +773,23 @@ class Root: add_feed.exposed = True + def remove_feed(self, url): + """ + Remove a feed from the file fee.lst. + """ + html = htmlheader + html += htmlnav + html += """<div class="left inner">""" + utils.remove_feed(self.feeds[url][4]) + html+= """<p>All articles from this feed are removed from the base.</p><br />""" + html += """<a href="/management/">Back to the management page.</a><br />\n""" + html += "<hr />\n" + html += htmlfooter + return html + + remove_feed.exposed = True + + def export(self, export_method): """ Export articles stored in the SQLite database in text files. |