summaryrefslogtreecommitdiff
path: root/gpscap.py
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-08-12 01:15:28 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-08-12 01:15:28 +0000
commit327419cda59f32c22116efbb7f6d1f5319d9a269 (patch)
tree60df083ec78b68a168a5ad2fcd67784283b1b3eb /gpscap.py
parent13588053c3894df940dd2f2f4fab5739fb5c61f1 (diff)
downloadgpsd-327419cda59f32c22116efbb7f6d1f5319d9a269.tar.gz
Make the submitter field a unform feature in gpscap records...
...rather than stashing it in the Notes field a lot of the time.
Diffstat (limited to 'gpscap.py')
-rw-r--r--gpscap.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/gpscap.py b/gpscap.py
index bdd2d5a3..c0e6c232 100644
--- a/gpscap.py
+++ b/gpscap.py
@@ -128,7 +128,14 @@ class GPSDictionary(ConfigParser.RawConfigParser):
if self.has_option(dev, "nmea"):
nmea = self.get(dev, "nmea")
ofp.write("<td>%s</td>\n" % nmea)
- ofp.write("<td>%s</td>\n" % self.get(dev, "notes"))
+ if self.has_option(dev, "notes"):
+ notes = self.get(dev, "notes")
+ else:
+ notes = ""
+ if self.has_option(dev, "submitter"):
+ notes += " Reported by %s." % self.get(dev, "submitter")
+ notes = notes.replace("@", "&#x40;").replace("<", "&lt;").replace(">", "&gt;")
+ ofp.write("<td>%s</td>\n" % notes)
ofp.write("</tr>\n")
ofp.write("</table>\n")