mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-06-24 05:35:10 +00:00
Prevent "TOTA" in cluster comments being flagged as Toilets on the Air, as this is ambiguous
This commit is contained in:
12
data/spot.py
12
data/spot.py
@@ -14,7 +14,6 @@ from core.constants import MODE_ALIASES
|
||||
from core.geo_utils import lat_lon_to_cq_zone, lat_lon_to_itu_zone
|
||||
from core.lookup_helper import lookup_helper, infer_band_from_freq, infer_mode_from_comment, \
|
||||
infer_mode_from_frequency, infer_mode_type_from_mode
|
||||
from data.lookup_credentials import LookupCredentials
|
||||
from core.sig_utils import populate_sig_ref_info, ANY_SIG_REGEX, get_ref_regex_for_sig
|
||||
from data.sig_ref import SIGRef
|
||||
|
||||
@@ -252,9 +251,16 @@ class Spot:
|
||||
if self.comment:
|
||||
sig_matches = re.finditer(r"(^|\W)" + ANY_SIG_REGEX + r"($|\W)", self.comment, re.IGNORECASE)
|
||||
for sig_match in sig_matches:
|
||||
# First of all, if we haven't got a SIG for this spot set yet, now we have. This covers things like cluster
|
||||
# spots where the comment is just "POTA".
|
||||
# See what SIG we think this is
|
||||
found_sig = sig_match.group(2).upper()
|
||||
|
||||
# "TOTA" is now ambiguous, with Toilets and Towers both using it. If we have found "TOTA" in a comment,
|
||||
# ignore it as we can't tell what it is.
|
||||
if found_sig != "TOTA":
|
||||
continue
|
||||
|
||||
# Now, if we haven't got a SIG for this spot set yet, now we have. This covers things like cluster
|
||||
# spots where the comment is just "POTA".
|
||||
if not self.sig:
|
||||
self.sig = found_sig
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
<p>This software is dedicated to the memory of Tom G1PJB, SK, a friend and colleague who sadly passed away around the time I started writing it in Autumn 2025. I was looking forward to showing it to you when it was done.</p>
|
||||
</div>
|
||||
|
||||
<script src="/js/common.js?v=1780999608"></script>
|
||||
<script src="/js/common.js?v=1781245126"></script>
|
||||
<script>$(document).ready(function() { $("#nav-link-about").addClass("active"); }); <!-- highlight active page in nav --></script>
|
||||
|
||||
{% end %}
|
||||
@@ -1,13 +1,6 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
|
||||
<div id="add-spot-intro-box" class="permanently-dismissible-box mt-3">
|
||||
<div class="alert alert-primary alert-dismissible fade show" role="alert">
|
||||
<i class="fa-solid fa-circle-info"></i> <strong>Adding spots to Spothole</strong><br/>This page is implemented as a proof of concept for adding spots to the Spothole system. Currently, spots added in this way are only visible within Spothole and are not sent "upstream" to DX clusters or xOTA spotting sites. The functionality might be extended to include this in future if there is demand for it. If you'd like this to be added, please give a thumbs-up on <a href="https://git.ianrenton.com/ian/spothole/issues/39" target="_new" class="alert-link">issue #39</a> or get in touch via email.
|
||||
<button type="button" id="add-spot-intro-box-dismiss" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-3">
|
||||
<div id="add-spot-area" class="card mb-3">
|
||||
<div class="card-header">
|
||||
@@ -60,6 +53,32 @@
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div id="upstream-area" class="mt-3" style="display:none;">
|
||||
<hr/>
|
||||
<div class="row g-2 align-items-center">
|
||||
<div class="col-auto">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" id="submit-upstream">
|
||||
<label class="form-check-label" for="submit-upstream">
|
||||
Also submit to <span id="upstream-provider-label"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto" id="upstream-provider-select-col" style="display:none;">
|
||||
<select id="upstream-provider-select" class="form-select form-select-sm"></select>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<button type="button" class="btn btn-sm btn-outline-secondary" id="upstream-credentials-btn" onclick="showCredentialsModal();" style="display:none;">
|
||||
<i class="fa-solid fa-key"></i> Credentials
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="hcaptcha-area" class="mt-3" style="display:none;">
|
||||
<div id="hcaptcha-widget"></div>
|
||||
</div>
|
||||
|
||||
<div id="result-good"></div>
|
||||
<div id="result-bad"></div>
|
||||
|
||||
@@ -69,8 +88,28 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/js/common.js?v=1780999608"></script>
|
||||
<script src="/js/add-spot.js?v=1780999608"></script>
|
||||
<!-- Credentials modal -->
|
||||
<div class="modal fade" id="credentials-modal" tabindex="-1" aria-labelledby="credentials-modal-label" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="credentials-modal-label">Credentials for <span id="credentials-provider-name"></span></h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p class="small text-muted">Credentials are stored only in your browser and are never saved on the server.</p>
|
||||
<div id="credentials-fields"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
|
||||
<button type="button" class="btn btn-primary" onclick="saveCredentials();">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/js/common.js?v=1781245126"></script>
|
||||
<script src="/js/add-spot.js?v=1781245126"></script>
|
||||
<script>$(document).ready(function() { $("#nav-link-add-spot").addClass("active"); }); <!-- highlight active page in nav --></script>
|
||||
|
||||
{% end %}
|
||||
@@ -70,8 +70,8 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/js/common.js?v=1780999608"></script>
|
||||
<script src="/js/alerts.js?v=1780999608"></script>
|
||||
<script src="/js/common.js?v=1781245127"></script>
|
||||
<script src="/js/alerts.js?v=1781245127"></script>
|
||||
<script>$(document).ready(function() { $("#nav-link-alerts").addClass("active"); }); <!-- highlight active page in nav --></script>
|
||||
|
||||
{% end %}
|
||||
@@ -76,9 +76,9 @@
|
||||
<script>
|
||||
let spotProvidersEnabledByDefault = {% raw json_encode(web_ui_options["spot-providers-enabled-by-default"]) %};
|
||||
</script>
|
||||
<script src="/js/common.js?v=1780999608"></script>
|
||||
<script src="/js/spotsbandsandmap.js?v=1780999608"></script>
|
||||
<script src="/js/bands.js?v=1780999608"></script>
|
||||
<script src="/js/common.js?v=1781245126"></script>
|
||||
<script src="/js/spotsbandsandmap.js?v=1781245126"></script>
|
||||
<script src="/js/bands.js?v=1781245126"></script>
|
||||
<script>$(document).ready(function() { $("#nav-link-bands").addClass("active"); }); <!-- highlight active page in nav --></script>
|
||||
|
||||
{% end %}
|
||||
@@ -1,6 +1,6 @@
|
||||
{% extends "skeleton.html" %}
|
||||
{% block head_extra %}
|
||||
<link rel="stylesheet" href="/css/style.css?v=1780999608" type="text/css">
|
||||
<link rel="stylesheet" href="/css/style.css?v=1781245126" type="text/css">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css" rel="stylesheet"
|
||||
integrity="sha384-sRIl4kxILFvY47J16cr9ZwB07vP4J8+LH7qKQnuqkuIAvNWLzeN8tE5YBujZqJLB" crossorigin="anonymous">
|
||||
<link href="/fa/css/fontawesome.min.css" rel="stylesheet" />
|
||||
@@ -19,9 +19,9 @@
|
||||
integrity="sha384-L1eE4eD41kpBIWe2I0eHy+GnEUC4RIpcvibVW2JCminuPlTl+2Bc528iPdVMg5Dn"
|
||||
crossorigin="anonymous"></script>
|
||||
|
||||
<script src="https://misc.ianrenton.com/jsutils/utils.js?v=1780999608"></script>
|
||||
<script src="https://misc.ianrenton.com/jsutils/ui-ham.js?v=1780999608"></script>
|
||||
<script src="https://misc.ianrenton.com/jsutils/geo.js?v=1780999608"></script>
|
||||
<script src="https://misc.ianrenton.com/jsutils/utils.js?v=1781245126"></script>
|
||||
<script src="https://misc.ianrenton.com/jsutils/ui-ham.js?v=1781245126"></script>
|
||||
<script src="https://misc.ianrenton.com/jsutils/geo.js?v=1781245126"></script>
|
||||
{% end %}
|
||||
{% block body %}
|
||||
<div class="container">
|
||||
|
||||
@@ -284,8 +284,8 @@
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.9/dist/chart.umd.min.js"></script>
|
||||
<script src="/js/common.js?v=1780999608"></script>
|
||||
<script src="/js/conditions.js?v=1780999608"></script>
|
||||
<script src="/js/common.js?v=1781245126"></script>
|
||||
<script src="/js/conditions.js?v=1781245126"></script>
|
||||
<script>$(document).ready(function () {
|
||||
$("#nav-link-conditions").addClass("active");
|
||||
}); <!-- highlight active page in nav --></script>
|
||||
|
||||
@@ -94,9 +94,9 @@
|
||||
<script>
|
||||
let spotProvidersEnabledByDefault = {% raw json_encode(web_ui_options["spot-providers-enabled-by-default"]) %};
|
||||
</script>
|
||||
<script src="/js/common.js?v=1780999608"></script>
|
||||
<script src="/js/spotsbandsandmap.js?v=1780999608"></script>
|
||||
<script src="/js/map.js?v=1780999608"></script>
|
||||
<script src="/js/common.js?v=1781245127"></script>
|
||||
<script src="/js/spotsbandsandmap.js?v=1781245127"></script>
|
||||
<script src="/js/map.js?v=1781245127"></script>
|
||||
<script>$(document).ready(function() { $("#nav-link-map").addClass("active"); }); <!-- highlight active page in nav --></script>
|
||||
|
||||
{% end %}
|
||||
@@ -104,9 +104,9 @@
|
||||
<script>
|
||||
let spotProvidersEnabledByDefault = {% raw json_encode(web_ui_options["spot-providers-enabled-by-default"]) %};
|
||||
</script>
|
||||
<script src="/js/common.js?v=1780999608"></script>
|
||||
<script src="/js/spotsbandsandmap.js?v=1780999608"></script>
|
||||
<script src="/js/spots.js?v=1780999608"></script>
|
||||
<script src="/js/common.js?v=1781245126"></script>
|
||||
<script src="/js/spotsbandsandmap.js?v=1781245126"></script>
|
||||
<script src="/js/spots.js?v=1781245126"></script>
|
||||
<script>$(document).ready(function() { $("#nav-link-spots").addClass("active"); }); <!-- highlight active page in nav --></script>
|
||||
|
||||
{% end %}
|
||||
@@ -59,8 +59,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/js/common.js?v=1780999608"></script>
|
||||
<script src="/js/status.js?v=1780999608"></script>
|
||||
<script src="/js/common.js?v=1781245126"></script>
|
||||
<script src="/js/status.js?v=1781245126"></script>
|
||||
<script>
|
||||
$(document).ready(function() { $("#nav-link-status").addClass("active"); }); <!-- highlight active page in nav -->
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user