diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-09-29 14:18:58 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-09-29 14:18:58 -0400 |
commit | 1e53aaa3a1e6292b18b0080f75de169ca6ca8be5 (patch) | |
tree | bac5261a4db38a63da08619d6400832c22b840a2 | |
parent | cd8f53454d0bd445f1b4401f655383d15f9a59cf (diff) | |
download | gpsd-1e53aaa3a1e6292b18b0080f75de169ca6ca8be5.tar.gz |
Display vendor notes in the HTML of the hardware table.
-rw-r--r-- | gpscap.ini | 3 | ||||
-rw-r--r-- | gpscap.py | 8 |
2 files changed, 8 insertions, 3 deletions
@@ -372,7 +372,8 @@ notes = Now owns what used to be the Thales and Asht product lines [Motorola] type = vendor vendor_site = http://www.motorola.com/ies/GPS/products_legacy.html -notes = Motorola has exited the GPS business +notes = Motorola has exited the GPS business. The OnCore line of + GPSes is now sold by <a href="http://www.synergy-gps.com/">Synergy Systems LLC</a> [Navcom] type = vendor @@ -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: |