aboutsummaryrefslogtreecommitdiff
path: root/utils.py
diff options
context:
space:
mode:
authorcedricbonhomme <devnull@localhost>2010-07-08 13:24:07 +0200
committercedricbonhomme <devnull@localhost>2010-07-08 13:24:07 +0200
commitfb350e5cd91380b86fe9c355299e4fda2b3ee1d4 (patch)
treeef9c2b2890699771cb6e74e3fc05548dd41fbe31 /utils.py
parentAdded cross.png (diff)
downloadnewspipe-fb350e5cd91380b86fe9c355299e4fda2b3ee1d4.tar.gz
newspipe-fb350e5cd91380b86fe9c355299e4fda2b3ee1d4.tar.bz2
newspipe-fb350e5cd91380b86fe9c355299e4fda2b3ee1d4.zip
Release 1.6. It is now possible to automatically add a feed (with the URL of the site), delete an article,delete a feed with all its articles and to delete all articles from the database. There is also some nice improvements to the side of performance (management page, tag clouds generation), tested with more than 3000 articles. Furthermore, a better HTML export of all the articles of the database. You can also export the articles in raw text. And finally some minor bugfix.
Diffstat (limited to 'utils.py')
-rwxr-xr-xutils.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/utils.py b/utils.py
index a6822685..7a9d7f81 100755
--- a/utils.py
+++ b/utils.py
@@ -2,8 +2,8 @@
#-*- coding: utf-8 -*-
__author__ = "Cedric Bonhomme"
-__version__ = "$Revision: 0.8 $"
-__date__ = "$Date: 2010/07/05 $"
+__version__ = "$Revision: 0.9 $"
+__date__ = "$Date: 2010/07/08 $"
__copyright__ = "Copyright (c) 2010 Cedric Bonhomme"
__license__ = "GPLv3"
@@ -219,6 +219,18 @@ def create_base():
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