From 241263e552a2c054c51fd01796ee9deb67641c32 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 30 May 2012 07:45:36 -0400 Subject: Better handling of discontinued attribute. --- gpscap.ini | 8 +++++--- gpscap.py | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/gpscap.ini b/gpscap.ini index 70c2b15d..d4e24210 100644 --- a/gpscap.ini +++ b/gpscap.ini @@ -27,7 +27,7 @@ # nmea = NMEA version this emits, if known # notes = Miscellaneous notes on this item. To be interpreted as HTML. # rating = excellent, good, fair, poor, broken, other -# discontinued = If present, product has been discontinued +# discontinued = If True, product has been discontinued # # Capability strings: # @@ -520,6 +520,7 @@ interfaces = Bluetooth, USB usbchip = pl2303 tested = 2.32 submitter = Dennis van Zuijlekom . +discontinued = True #% Axiom @@ -636,6 +637,7 @@ uses = SiRF-2 interfaces = USB usbchip = Cypress M8 CY7C64013 tested = 2.5 +discontinued = True notes = This was the replacement for the old Zodiac version that spoke Rockwell binary protocol; it in turn has been discontinued. Some other sentences can be enabled. Requires a 2.6.10 or better @@ -647,7 +649,7 @@ vendor = Delorme packaging = mouse uses = Zodiac interfaces = RS232C -notes = These models have been discontinued. +discontinued = True [TripMate] type = device @@ -1461,7 +1463,7 @@ interfaces = RS232 tested = 2.21 rating = excellent nmea = v1.5 APA, v1.5 XTE, v2.1 GSA -discontinued = true +discontinued = True submitter = Chris S. Newell [eXplorist 210] diff --git a/gpscap.py b/gpscap.py index 49eaea62..9bf5eeb9 100644 --- a/gpscap.py +++ b/gpscap.py @@ -97,7 +97,7 @@ class GPSDictionary(ConfigParser.RawConfigParser): namefield = dev if self.has_option(dev, "techdoc"): namefield = "%s" % (self.get(dev, "techdoc"), dev) - if self.has_option(dev, "discontinued"): + if self.has_option(dev, "discontinued") and self.getboolean(dev, "discontinued"): namefield = namefield + " Discontinued icon" ofp.write("%s\n" % namefield) ofp.write("%s\n" % self.get(dev, "packaging")) -- cgit v1.2.1