From 07a7a1dfeb91e20548bb0e95fd87687d1fbbbc13 Mon Sep 17 00:00:00 2001 From: cedricbonhomme Date: Fri, 2 Mar 2012 08:29:33 +0100 Subject: New statistics page. Lighter management page. --- pyAggr3g470r.py | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/pyAggr3g470r.py b/pyAggr3g470r.py index b7f5c9e6..01064228 100755 --- a/pyAggr3g470r.py +++ b/pyAggr3g470r.py @@ -228,7 +228,7 @@ class Root: return html + "" - def management(self, word_size=6, max_nb_articles=5): + def management(self, max_nb_articles=5): """ Management page. Allows adding and deleting feeds. Export functions of the SQLite data base @@ -258,10 +258,11 @@ class Root: # Informations about the data base of articles html += """

%s article(s) are loaded from the database with - %s unread article(s).
""" % \ + %s unread article(s).
\n""" % \ (self.nb_articles, self.nb_unread_articles) - html += """Database: %s.\n
Size: %s bytes.

\n""" % \ + html += """Database: %s.\n
Size: %s bytes.
\n""" % \ (os.path.abspath(utils.sqlite_base), os.path.getsize(utils.sqlite_base)) + html += 'Advanced statistics.

\n' html += """
\n
\n""" html += """
\n
\n""" @@ -286,7 +287,20 @@ class Root: html += """\t\n""" html += """\t\n""" html += """\n\t\n\n""" - html += "
\n\n" + html += "
" + html += htmlfooter + return html + + management.exposed = True + + + def statistics(self, word_size=6): + """ + More advanced statistics. + """ + html = htmlheader() + html += htmlnav + html += """
\n""" # Some statistics (most frequent word) if self.feeds: @@ -301,12 +315,12 @@ class Root: html += '
' + \ utils.tag_cloud(self.top_words) + '
' html += "
\n" + html += htmlfooter return html - management.exposed = True - + statistics.exposed = True def q(self, querystring=None): """ Simply search for the string 'querystring' -- cgit