From 327419cda59f32c22116efbb7f6d1f5319d9a269 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 12 Aug 2009 01:15:28 +0000 Subject: Make the submitter field a unform feature in gpscap records... ...rather than stashing it in the Notes field a lot of the time. --- gpscap.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'gpscap.py') 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("%s\n" % nmea) - ofp.write("%s\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("@", "@").replace("<", "<").replace(">", ">") + ofp.write("%s\n" % notes) ofp.write("\n") ofp.write("\n") -- cgit v1.2.1