damned-lies r755 - in trunk: . scripts



Author: claudep
Date: Sat Feb 23 17:21:20 2008
New Revision: 755
URL: http://svn.gnome.org/viewvc/damned-lies?rev=755&view=rev

Log:
2008-02-23  Claude Paroz  <claude 2xlibre net>

	* scripts/allstats.py: Script to dump the Statistics table on a page.

Added:
   trunk/scripts/allstats.py   (contents, props changed)
Modified:
   trunk/ChangeLog

Added: trunk/scripts/allstats.py
==============================================================================
--- (empty file)
+++ trunk/scripts/allstats.py	Sat Feb 23 17:21:20 2008
@@ -0,0 +1,16 @@
+#!/usr/bin/env python
+""" This script dumps the entire Statistics table on 
+    a HTML page. """
+
+import sys
+sys.path.append('../')
+from database import *
+
+print "Content-type: text/html; charset=UTF-8\n"
+
+res = Statistics.select()
+print "<table>"
+for stat in list(res):
+    print "<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>" % \
+           (stat.Module, stat.Type, stat.Domain, stat.Branch, stat.Language, stat.Translated, stat.Fuzzy, stat.Untranslated)
+print "</table>"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]