From ee45a15b4e17f0fa64588baad8fe6dc4e810ebef Mon Sep 17 00:00:00 2001
From: Ian Renton
Date: Fri, 11 Sep 2026 16:18:09 +0100
Subject: [PATCH] Add telnet server
---
README.md | 8 +++-----
config-example.yml | 3 +++
core/config.py | 1 +
templates/about.html | 14 +++++++++++++-
templates/add_spot.html | 2 +-
templates/alerts.html | 2 +-
templates/bands.html | 4 ++--
templates/base.html | 10 +++++-----
templates/conditions.html | 2 +-
templates/map.html | 4 ++--
templates/spots.html | 4 ++--
templates/status.html | 2 +-
webserver/handlers/pagetemplate.py | 13 ++++++++++++-
13 files changed, 47 insertions(+), 22 deletions(-)
diff --git a/README.md b/README.md
index 938b8f2..84915cc 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
# 
Spothole is a utility to aggregate "spots" from amateur radio DX clusters and xOTA spotting sites, and provide an open
-JSON API as well as a website to browse the data.
+JSON API as well as a website to browse the data, and its own telnet server for integration with desktop loggers.

@@ -17,10 +17,8 @@ Spothole itself is also open source, Public Domain licenced code that anyone can
Supported data sources include DX Clusters, the Reverse Beacon Network (RBN), the APRS Internet Service (APRS-IS), POTA,
SOTA, WWFF, GMA, WWBOTA, HEMA, Parks 'n' Peaks, ZLOTA, WOTA, BOTA, LLOTA, WWTOTA, Tiles on the Air, the UK Packet
-Repeater Network, NG3K, and any site based on the xOTA software by nischu.
-
-Additional Special Interest Groups (SIGs) without their own specific data source include KRMNPA, SANPCPA, WAB, WAI and
-DME.
+Repeater Network, NG3K, and any site based on the xOTA software by nischu. It also integrates with QRZ.com and HamQTH,
+retrieves solar data from various sources, provides information about upcoming contests, and more.

diff --git a/config-example.yml b/config-example.yml
index ec61412..589c8ad 100644
--- a/config-example.yml
+++ b/config-example.yml
@@ -20,6 +20,9 @@ base_url: "http://localhost:8080"
# Whether to run a telnet spot server as well as the web interface
telnet_server_enabled: false
+# Telnet server address. This is not really needed by the software itself, just displayed in documentation.
+telnet_server_address: "localhost"
+
# Port to run the telnet server on
telnet_server_port: 7373
diff --git a/core/config.py b/core/config.py
index fc07e4b..9218951 100644
--- a/core/config.py
+++ b/core/config.py
@@ -25,6 +25,7 @@ MAX_ALERT_AGE = config.get("max_alert_age_sec", 604800)
SERVER_OWNER_CALLSIGN = config.get("server_owner_callsign", "N0CALL")
WEB_SERVER_PORT = config.get("web_server_port", 8080)
TELNET_SERVER_ENABLED = config.get("telnet_server_enabled", False)
+TELNET_SERVER_ADDRESS = config.get("telnet_server_address", "localhost")
TELNET_SERVER_PORT = config.get("telnet_server_port", 7373)
ALLOW_SPOTTING = config.get("allow_spotting", True)
ALLOW_UPSTREAM_SPOTTING = config.get("allow_upstream_spotting", True)
diff --git a/templates/about.html b/templates/about.html
index 9064b9c..b39ff5e 100644
--- a/templates/about.html
+++ b/templates/about.html
@@ -34,6 +34,13 @@
like. The usage is explained in more detail in the README file.
+ {% if telnet_server_enabled %}
+
You can use it as a traditional telnet-based source of spots, similar to DXSpider and other software, in
+ your desktop logging application. To do this, set up your logger with the server address
+ {{ telnet_server_address }} and port {{ telnet_server_port }}. You can also access
+ it from a terminal with telnet {{ telnet_server_address }} {{ telnet_server_port }}.
+
+ {% end %}
You can write your own client using the Spothole API, using the main Spothole instance to provide
data, and do whatever you like with it. The README contains guidance on how to do this, and the full API
docs are linked above. You can also find reference implementations in the form of Spothole's own web-based
@@ -85,7 +92,8 @@
Spothole can retrieve solar and propagation condition data from HamQSL, the
NOAA Space Weather Prediction Center, the Lowell GIRO Data Center and prop.kc2g.com
@@ -162,6 +170,10 @@
modify it however you like, you can claim you wrote it and charge people £1000 for a copy, I don't really mind.
(Please don't do the last one. But if you're using my code for something cool, it would be nice to hear from
you!)
+
What commands are supported in the telnet server?
+
Currently, exit, and nothing else. Support for some DXSpider-like commands may be added to Spothole
+ in due course, but at the moment if you want to add Spothole as a telnet cluster data source to your desktop
+ logging application, that application must handle filtering itself.
Data Accuracy
Please note that the data coming out of Spothole is only as good as the data going in. People mis-hear and make
typos when spotting callsigns all the time. There are also plenty of cases where Spothole's data, particularly
diff --git a/templates/add_spot.html b/templates/add_spot.html
index 4682df8..a1ae6f3 100644
--- a/templates/add_spot.html
+++ b/templates/add_spot.html
@@ -77,7 +77,7 @@
-
+
diff --git a/templates/alerts.html b/templates/alerts.html
index 291a87d..2db1149 100644
--- a/templates/alerts.html
+++ b/templates/alerts.html
@@ -83,7 +83,7 @@
-
+
diff --git a/templates/bands.html b/templates/bands.html
index bc2db5a..cf4d0c2 100644
--- a/templates/bands.html
+++ b/templates/bands.html
@@ -76,8 +76,8 @@
-
-
+
+
diff --git a/templates/base.html b/templates/base.html
index 202abcf..a807322 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -1,6 +1,6 @@
{% extends "skeleton.html" %}
{% block head_extra %}
-
+
@@ -16,10 +16,10 @@
window.fetchEventSource = fetchEventSource;
-
-
-
-
+
+
+
+
{% end %}
{% block body %}