[Pcsclite-cvs-commit] r6263 - /website/matrix.py

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Fri Apr 6 13:55:40 UTC 2012


Author: rousseau
Date: Fri Apr  6 13:55:40 2012
New Revision: 6263

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=6263
Log:
Repeat the table header every 5 lines

It is now more easy to know the title of a column when you are in the
middle of the big matrix.

Modified:
    website/matrix.py

Modified: website/matrix.py
URL: http://svn.debian.org/wsvn/pcsclite/website/matrix.py?rev=6263&op=diff
==============================================================================
--- website/matrix.py (original)
+++ website/matrix.py Fri Apr  6 13:55:40 2012
@@ -529,21 +529,31 @@
 
     file_desc.write('<table border="1" summary="">\n')
 
-    file_desc.write('<thead><tr>')
-    file_desc.write("<th>#</th>")
+    table_header = '<tr>'
+    table_header += "<th>#</th>"
     for field in fields:
-        file_desc.write("<th><a href='%s'>%s</a></th>" % (field +
-                ".html", field))
-    file_desc.write('</tr></thead>\n')
+        table_header += "<th><a href='%s'>%s</a></th>" % (field +
+                ".html", field)
+    table_header += '</tr>\n'
+    file_desc.write('<thead>' + table_header + '</thead>')
+
+    # new 'header' for inside the table
+    table_header = '<tbody>' + table_header + '</tbody>'
 
     num = 0
     for reader in index:
         num += 1
         add_line(file_desc, num, readers[reader], fields)
 
+        if (num % 5) == 0:
+            file_desc.write(table_header)
+
         if 'interface' in readers[reader]:
             num += 1
             add_line(file_desc, num, readers[reader]['interface'], fields)
+
+            if (num % 5) == 0:
+                file_desc.write(table_header)
 
     file_desc.write('</table>\n')
 




More information about the Pcsclite-cvs-commit mailing list