aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcedricbonhomme <devnull@localhost>2010-06-10 13:34:25 +0200
committercedricbonhomme <devnull@localhost>2010-06-10 13:34:25 +0200
commitfe6f5ad002195ba4d4f06303b27a4cc75e15f6a6 (patch)
tree3e5a45314a6b036ee23e660dc7d48d31d6314007
parentRemove a feed from the file feed.lst. Some improvements. (diff)
downloadnewspipe-fe6f5ad002195ba4d4f06303b27a4cc75e15f6a6.tar.gz
newspipe-fe6f5ad002195ba4d4f06303b27a4cc75e15f6a6.tar.bz2
newspipe-fe6f5ad002195ba4d4f06303b27a4cc75e15f6a6.zip
It is now possible to remove all articles of a given feed from the SQLite base via the management page.
-rwxr-xr-xpyAggr3g470r.py2
-rwxr-xr-xutils.py3
2 files changed, 3 insertions, 2 deletions
diff --git a/pyAggr3g470r.py b/pyAggr3g470r.py
index c5eb9b6a..6b2b74f3 100755
--- a/pyAggr3g470r.py
+++ b/pyAggr3g470r.py
@@ -781,7 +781,7 @@ class Root:
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+= """<p>All articles from this feed are now removed from the base.</p><br />"""
html += """<a href="/management/">Back to the management page.</a><br />\n"""
html += "<hr />\n"
html += htmlfooter
diff --git a/utils.py b/utils.py
index 38e077b2..e9395ed3 100755
--- a/utils.py
+++ b/utils.py
@@ -217,7 +217,8 @@ def remove_feed(feed_url):
# Remove articles from this feed from the SQLite base.
conn = sqlite3.connect(sqlite_base, isolation_level = None)
c = conn.cursor()
- c.execute("")
+ c.execute("DELETE FROM feeds WHERE feed_link='" + feed_url +"'")
+ c.execute("DELETE FROM articles WHERE feed_link='" + feed_url +"'")
conn.commit()
c.close()
bgstack15