summaryrefslogtreecommitdiff
path: root/gpscap.py
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-09-29 14:18:58 -0400
committerEric S. Raymond <esr@thyrsus.com>2011-09-29 14:18:58 -0400
commit1e53aaa3a1e6292b18b0080f75de169ca6ca8be5 (patch)
treebac5261a4db38a63da08619d6400832c22b840a2 /gpscap.py
parentcd8f53454d0bd445f1b4401f655383d15f9a59cf (diff)
downloadgpsd-1e53aaa3a1e6292b18b0080f75de169ca6ca8be5.tar.gz
Display vendor notes in the HTML of the hardware table.
Diffstat (limited to 'gpscap.py')
-rw-r--r--gpscap.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/gpscap.py b/gpscap.py
index f8562fad..2aed91b1 100644
--- a/gpscap.py
+++ b/gpscap.py
@@ -68,11 +68,15 @@ class GPSDictionary(ConfigParser.RawConfigParser):
<th width='50%%'>Notes</th>
</tr>
"""
- vhead = "<tr><td style='text-align:center;' colspan='7'><a href='%s'>%s</a></td></tr>\n"
+ vhead1 = "<tr><td style='text-align:center;' colspan='7'><a href='%s'>%s</a></td></tr>\n"
+ vhead2 = "<tr><td style='text-align:center;' colspan='7'><a href='%s'>%s</a><br/><p>%s</p></td></tr>\n"
hotpluggables = ("pl2303", "CP2101")
ofp.write(thead % (len(self.devices), len(self.vendors)))
for vendor in self.vendors:
- ofp.write(vhead % (self.get(vendor, "vendor_site"), vendor))
+ if self.has_option(vendor, "notes"):
+ ofp.write(vhead2 % (self.get(vendor, "vendor_site"), vendor, self.get(vendor, "notes")))
+ else:
+ ofp.write(vhead1 % (self.get(vendor, "vendor_site"), vendor))
relevant = []
for dev in self.devices:
if self.get(dev, "vendor") == vendor: