diff options
author | cedricbonhomme <devnull@localhost> | 2010-07-08 13:24:07 +0200 |
---|---|---|
committer | cedricbonhomme <devnull@localhost> | 2010-07-08 13:24:07 +0200 |
commit | fb350e5cd91380b86fe9c355299e4fda2b3ee1d4 (patch) | |
tree | ef9c2b2890699771cb6e74e3fc05548dd41fbe31 /pyAggr3g470r.py | |
parent | Added cross.png (diff) | |
download | newspipe-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 'pyAggr3g470r.py')
-rwxr-xr-x | pyAggr3g470r.py | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/pyAggr3g470r.py b/pyAggr3g470r.py index 8bf78c05..4b361465 100755 --- a/pyAggr3g470r.py +++ b/pyAggr3g470r.py @@ -2,8 +2,8 @@ #-*- coding: utf-8 -*- __author__ = "Cedric Bonhomme" -__version__ = "$Revision: 1.5 $" -__date__ = "$Date: 2010/07/05 $" +__version__ = "$Revision: 1.6 $" +__date__ = "$Date: 2010/07/08 $" __copyright__ = "Copyright (c) 2010 Cedric Bonhomme" __license__ = "GPLv3" @@ -212,7 +212,7 @@ class Root: html += """<form method=get action="/fetch/">\n<input type="submit" value="Fetch all feeds"></form>\n""" - html += """<form method=get action="/add_feed/">\n<input + html += """<form method=get action="/drop_base">\n<input type="submit" value="Delete all articles"></form>\n""" html += "<h1>Export articles</h1>" html += """<form method=get action="/export/"><select name="export_method">\n""" @@ -814,6 +814,16 @@ class Root: delete_article.exposed = True + def drop_base(self): + """ + Delete all articles + """ + utils.drop_base() + return self.management() + + drop_base.exposed = True + + def export(self, export_method): """ Export articles stored in the SQLite database in text files. @@ -905,8 +915,8 @@ class Root: try: print "Watching %s" % utils.sqlite_base while True: - time.sleep(2) - # very simple test + time.sleep(1) + # simple test (date of last modification: getmtime) if os.path.getmtime(utils.sqlite_base) != old_time: print "The base of feeds (%s) has changed.\nReloading..." % utils.sqlite_base self.update() |