diff options
Diffstat (limited to 'abs/core/supplemental-web/contents/count.py')
-rw-r--r-- | abs/core/supplemental-web/contents/count.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/abs/core/supplemental-web/contents/count.py b/abs/core/supplemental-web/contents/count.py index 2889af1..9f3530f 100644 --- a/abs/core/supplemental-web/contents/count.py +++ b/abs/core/supplemental-web/contents/count.py @@ -8,6 +8,11 @@ import socket def main(argv): + #get LinHES version + verfile = open('/etc/LinHES-release', 'r') + verLH = verfile.read() + verfile.close() + grandtotal=0 grandtotal_current=0 db = MySQLdb.connect(host="localhost", user="mythtv", passwd="mythtv", db="mythconverg") @@ -39,17 +44,20 @@ def main(argv): days_current = hours_current / 24.0 print '<div id="header">' - + print "<h3>Welcome to</h3>" + print "<h1>" , verLH , "</h1>" + print "<h3>on " , socket.gethostname() , "</h3>" + print "</br>" print "<table>" print " <tr>" - print " <td> Currently there are " , len(result_current) , " recorded programs. With a viewing time of %.2f days or %.2f hours. </td>" %(days_current,hours_current) + print " <td>Currently there are " , len(result_current) , " recorded programs, with a viewing time of %.2f days or %.2f hours.</td>" %(days_current,hours_current) print " </tr>" print "</table>" print "</br> " print "<table>" print " <tr>" - print " <td> Overall there have been " , len(result) , "shows recorded. With viewing time of %.2f days or %.2f hours </td>"%(days,hours) + print " <td>Overall there have been " , len(result) , "shows recorded, with a viewing time of %.2f days or %.2f hours.</td>"%(days,hours) print " </tr>" print "</table>" print '</div>' @@ -69,7 +77,7 @@ def main(argv): # print "%40s %26s %10s" %(row[0],row[2],row[1]) print "</table>" print "</div>" -#Top categorys +#Top categories print '<div id="column"></div>' print '<table class="sample">' |