mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-10-27 16:59:25 +00:00
Stop cleaning up comments, Spothole should be agnostic to that kind of thing.
This commit is contained in:
@@ -111,11 +111,6 @@ class Alert:
|
|||||||
if self.dx_calls and not self.dx_names:
|
if self.dx_calls and not self.dx_names:
|
||||||
self.dx_names = list(map(lambda c: lookup_helper.infer_name_from_callsign(c), self.dx_calls))
|
self.dx_names = list(map(lambda c: lookup_helper.infer_name_from_callsign(c), self.dx_calls))
|
||||||
|
|
||||||
# Clean up comments
|
|
||||||
if self.comment:
|
|
||||||
comment = re.sub(r"\(de [A-Za-z0-9]*\)", "", self.comment)
|
|
||||||
self.comment = comment.strip()
|
|
||||||
|
|
||||||
# Always create an ID based on a hash of every parameter *except* received_time. This is used as the index
|
# Always create an ID based on a hash of every parameter *except* received_time. This is used as the index
|
||||||
# to a map, which as a byproduct avoids us having multiple duplicate copies of the object that are identical
|
# to a map, which as a byproduct avoids us having multiple duplicate copies of the object that are identical
|
||||||
# apart from that they were retrieved from the API at different times. Note that the simple Python hash()
|
# apart from that they were retrieved from the API at different times. Note that the simple Python hash()
|
||||||
|
|||||||
@@ -249,14 +249,6 @@ class Spot:
|
|||||||
if self.comment and not self.qrt:
|
if self.comment and not self.qrt:
|
||||||
self.qrt = "QRT" in self.comment.upper()
|
self.qrt = "QRT" in self.comment.upper()
|
||||||
|
|
||||||
# Clean up comments
|
|
||||||
if self.comment:
|
|
||||||
comment = re.sub(r"\(de [A-Za-z0-9]*\)", "", self.comment)
|
|
||||||
comment = re.sub(r"\[.*]:", "", comment)
|
|
||||||
comment = re.sub(r"\[.*]", "", comment)
|
|
||||||
comment = re.sub(r"\"\"", "", comment)
|
|
||||||
self.comment = comment.strip()
|
|
||||||
|
|
||||||
# DX operator details lookup, using QRZ.com. This should be the last resort compared to taking the data from
|
# DX operator details lookup, using QRZ.com. This should be the last resort compared to taking the data from
|
||||||
# the actual spotting service, e.g. we don't want to accidentally use a user's QRZ.com home lat/lon instead of
|
# the actual spotting service, e.g. we don't want to accidentally use a user's QRZ.com home lat/lon instead of
|
||||||
# the one from the park reference they're at.
|
# the one from the park reference they're at.
|
||||||
|
|||||||
Reference in New Issue
Block a user