[Pcsclite-cvs-commit] r5754 - /website/matrix.py
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Sun May 15 14:59:19 UTC 2011
Author: rousseau
Date: Sun May 15 14:59:15 2011
New Revision: 5754
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=5754
Log:
Add comments
Modified:
website/matrix.py
Modified: website/matrix.py
URL: http://svn.debian.org/wsvn/pcsclite/website/matrix.py?rev=5754&op=diff
==============================================================================
--- website/matrix.py (original)
+++ website/matrix.py Sun May 15 14:59:15 2011
@@ -557,23 +557,33 @@
'bMaxCCIDBusySlots', 'features', 'limitations', 'note', 'release']
for f in fields:
+ # create a list of tuples [field value, reader]
index = list()
for r in readers.keys():
index.append([readers[r].get(f, ""), r])
+
if f == 'section':
# hack to sort in the order supported, shouldwork, unsupported, disabled
index = [(s.replace('supported', 'asupported'), r) for s, r in index]
index = [(s.replace('disabled', 'zdisabled'), r) for s, r in index]
+
if f in ['dwDefaultClock', 'dwMaximumClock', 'dwDataRate',
'dwMaxDataRate', 'dwMaxIFSD', 'dwMaxCCIDMessageLength']:
# convert from text to decimal
index = [(float(s.split(' ')[0]) * 1000, r) for s, r in index]
+
if f == 'release':
index = [(release2int(s), r) for s, r in index]
+
+ # sort the index according to field value
index.sort()
+
+ # put the main field in column 0
sorted_fields = list(fields)
sorted_fields.remove(f)
sorted_fields.insert(0, f)
+
+ # generate the table
generate_table(readers, f, [r for f, r in index], sorted_fields)
More information about the Pcsclite-cvs-commit
mailing list