aboutsummaryrefslogtreecommitdiff
path: root/source/utils.py
diff options
context:
space:
mode:
authorcedricbonhomme <devnull@localhost>2012-05-01 18:18:28 +0200
committercedricbonhomme <devnull@localhost>2012-05-01 18:18:28 +0200
commit864d8a49934894fe59ed89517063f1c05d6fb0fc (patch)
treeae46d3115adda02f27ac2ab776526169d137557f /source/utils.py
parentSpeed improvement. (diff)
downloadnewspipe-864d8a49934894fe59ed89517063f1c05d6fb0fc.tar.gz
newspipe-864d8a49934894fe59ed89517063f1c05d6fb0fc.tar.bz2
newspipe-864d8a49934894fe59ed89517063f1c05d6fb0fc.zip
It is now possible to update information about a feed with the MongoDG database.
Diffstat (limited to 'source/utils.py')
-rwxr-xr-xsource/utils.py38
1 files changed, 0 insertions, 38 deletions
diff --git a/source/utils.py b/source/utils.py
index da68550b..26492b8d 100755
--- a/source/utils.py
+++ b/source/utils.py
@@ -36,7 +36,6 @@ __license__ = "GPLv3"
import os
import re
-import sqlite3
import operator
import urlparse
import calendar
@@ -252,43 +251,6 @@ def change_feed_url(old_feed_url, new_feed_url):
with open("./var/feed.lst", "w") as f:
f.write("\n".join(lines))
- # Replace the URL in the data base.
- try:
- conn = sqlite3.connect(sqlite_base, isolation_level = None)
- c = conn.cursor()
- c.execute("UPDATE articles SET feed_link='" + new_feed_url + "' WHERE feed_link='" + old_feed_url +"'")
- c.execute("UPDATE feeds SET feed_link='" + new_feed_url + "' WHERE feed_link='" + old_feed_url +"'")
- conn.commit()
- c.close()
- except Exception, e:
- print e
-
-def change_feed_name(feed_url, new_feed_name):
- """
- Change the name of a feed given in parameter.
- """
- try:
- conn = sqlite3.connect(sqlite_base, isolation_level = None)
- c = conn.cursor()
- c.execute('UPDATE feeds SET feed_title="' + new_feed_name + '" WHERE feed_link="' + feed_url +'"')
- conn.commit()
- c.close()
- except Exception, e:
- print e
-
-def change_feed_logo(feed_url, new_feed_logo):
- """
- Change the logo of a feed given in parameter.
- """
- try:
- conn = sqlite3.connect(sqlite_base, isolation_level = None)
- c = conn.cursor()
- c.execute('UPDATE feeds SET feed_image_link="' + new_feed_logo + '" WHERE feed_link="' + feed_url +'"')
- conn.commit()
- c.close()
- except Exception, e:
- print e
-
def remove_feed(feed_url):
"""
Remove a feed from the file feed.lst and from the SQLite base.
bgstack15