aboutsummaryrefslogtreecommitdiff
path: root/utils.py
diff options
context:
space:
mode:
authorcedricbonhomme <devnull@localhost>2012-03-09 08:16:19 +0100
committercedricbonhomme <devnull@localhost>2012-03-09 08:16:19 +0100
commit4b535d747257bd532ca838149a86d010099513d4 (patch)
treecb9b557b6c2cb89f841bc9f7d059c08cb7807051 /utils.py
parentMongoDB configuration (address, port, username and password) is loaded at lau... (diff)
downloadnewspipe-4b535d747257bd532ca838149a86d010099513d4.tar.gz
newspipe-4b535d747257bd532ca838149a86d010099513d4.tar.bz2
newspipe-4b535d747257bd532ca838149a86d010099513d4.zip
Removed create_base() for SQLite.
Diffstat (limited to 'utils.py')
-rwxr-xr-xutils.py32
1 files changed, 0 insertions, 32 deletions
diff --git a/utils.py b/utils.py
index 2c16f50c..d789f006 100755
--- a/utils.py
+++ b/utils.py
@@ -364,38 +364,6 @@ def search_feed(url):
return feed_link['href']
return None
-def create_base():
- """
- Create the base if not exists.
- """
- sqlite3.register_adapter(str, lambda s : s.decode('utf-8'))
- conn = sqlite3.connect(sqlite_base, isolation_level = None)
- c = conn.cursor()
- # table of feeds
- c.execute('''create table if not exists feeds
- (feed_title text, feed_site_link text, \
- feed_link text PRIMARY KEY, feed_image_link text,
- mail text)''')
- # table of articles
- c.execute('''create table if not exists articles
- (article_date text, article_title text, \
- article_link text PRIMARY KEY, article_description text, \
- article_readed text, feed_link text, like text)''')
- conn.commit()
- c.close()
-
-def drop_base():
- """
- Delete all articles from the database.
- """
- sqlite3.register_adapter(str, lambda s : s.decode('utf-8'))
- conn = sqlite3.connect(sqlite_base, isolation_level = None)
- c = conn.cursor()
- c.execute('''DROP TABLE IF EXISTS feeds''')
- c.execute('''DROP TABLE IF EXISTS articles''')
- conn.commit()
- c.close()
-
def load_feed():
"""
Load feeds and articles in a dictionary.
bgstack15